Bug 1287785 - avoid copying ScrollMetadata values in RenderLayers; r=botond
authorNathan Froyd <froydnj@gmail.com>
Thu, 21 Jul 2016 16:45:24 -0400
changeset 306168 920b164008c2fd1912761a7625c16e1e80d9e094
parent 306167 eb74a01c8dc0bc508ea8b492e6a4c179e1c2ff19
child 306169 d7988da78c417062fd44170fe8881308b9803dbc
push id30480
push usercbook@mozilla.com
push dateFri, 22 Jul 2016 09:58:20 +0000
treeherdermozilla-central@e0bc88708ffe [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;