Bug 1285619 - Call ResetLayerStateForRecycling() when recycling an image or color layer. r=mstange, a=gchang
authorBotond Ballo <botond@mozilla.com>
Fri, 08 Jul 2016 17:25:09 -0400
changeset 342191 c5fdc568bd3b213a3b03636aa6ca400cfd8cfd99
parent 342190 76fafe444a3726398034b5aed84a771a05f593d9
child 342192 698bdd627b48a975b31d7a5eda46eb781fd67ce8
push id1183
push userraliiev@mozilla.com
push dateMon, 05 Sep 2016 20:01:49 +0000
treeherdermozilla-release@3148731bed45 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmstange, gchang
bugs1285619
milestone49.0a2
Bug 1285619 - Call ResetLayerStateForRecycling() when recycling an image or color layer. r=mstange, a=gchang MozReview-Commit-ID: GD4NRCoJXWf
layout/base/FrameLayerBuilder.cpp
--- a/layout/base/FrameLayerBuilder.cpp
+++ b/layout/base/FrameLayerBuilder.cpp
@@ -2057,17 +2057,17 @@ ResetLayerStateForRecycling(Layer* aLaye
 
 already_AddRefed<ColorLayer>
 ContainerState::CreateOrRecycleColorLayer(PaintedLayer *aPainted)
 {
   PaintedDisplayItemLayerUserData* data =
       static_cast<PaintedDisplayItemLayerUserData*>(aPainted->GetUserData(&gPaintedDisplayItemLayerUserData));
   RefPtr<ColorLayer> layer = data->mColorLayer;
   if (layer) {
-    layer->SetMaskLayer(nullptr);
+    ResetLayerStateForRecycling(layer);
     layer->ClearExtraDumpInfo();
   } else {
     // Create a new layer
     layer = mManager->CreateColorLayer();
     if (!layer)
       return nullptr;
     // Mark this layer as being used for painting display items
     data->mColorLayer = layer;
@@ -2081,17 +2081,17 @@ ContainerState::CreateOrRecycleColorLaye
 
 already_AddRefed<ImageLayer>
 ContainerState::CreateOrRecycleImageLayer(PaintedLayer *aPainted)
 {
   PaintedDisplayItemLayerUserData* data =
       static_cast<PaintedDisplayItemLayerUserData*>(aPainted->GetUserData(&gPaintedDisplayItemLayerUserData));
   RefPtr<ImageLayer> layer = data->mImageLayer;
   if (layer) {
-    layer->SetMaskLayer(nullptr);
+    ResetLayerStateForRecycling(layer);
     layer->ClearExtraDumpInfo();
   } else {
     // Create a new layer
     layer = mManager->CreateImageLayer();
     if (!layer)
       return nullptr;
     // Mark this layer as being used for painting display items
     data->mImageLayer = layer;