Bug 1287785 - avoid copying ScrollMetadata values in RenderLayers; r=botond
authorNathan Froyd <froydnj@gmail.com>
Thu, 21 Jul 2016 16:45:24 -0400
changeset 346198 920b164008c2fd1912761a7625c16e1e80d9e094
parent 346197 eb74a01c8dc0bc508ea8b492e6a4c179e1c2ff19
child 346199 d7988da78c417062fd44170fe8881308b9803dbc
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbotond
bugs1287785
milestone50.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1287785 - avoid copying ScrollMetadata values in RenderLayers; r=botond Using `auto' here means that we're copying each ScrollMetadata value as we examine it. Using `auto&' here means that we don't copy, which is probably the intended behavior.
gfx/layers/composite/ContainerLayerComposite.cpp
--- a/gfx/layers/composite/ContainerLayerComposite.cpp
+++ b/gfx/layers/composite/ContainerLayerComposite.cpp
@@ -594,17 +594,17 @@ RenderLayers(ContainerT* aContainer,
     const RenderTargetIntRect& clipRect = preparedData.mClipRect;
     Layer* layer = layerToRender->GetLayer();
 
     if (layerToRender->HasStaleCompositor()) {
       continue;
     }
 
     if (gfxPrefs::LayersDrawFPS()) {
-      for (auto metadata : layer->GetAllScrollMetadata()) {
+      for (const auto& metadata : layer->GetAllScrollMetadata()) {
         if (metadata.IsApzForceDisabled()) {
           aManager->DisabledApzWarning();
           break;
         }
       }
     }
 
     Color color;