Backed out changeset 517b38838e09 (bug 1296793) for causing bug 1299908. a=backout
authorRyan VanderMeulen <ryanvm@gmail.com>
Fri, 02 Sep 2016 10:31:18 -0400
changeset 342570 7579892529ee8311720bb0902d58a7ad591004a3
parent 342569 443b679b7a81902ac3e4aeace26fd9ef2ab71c2e
child 342571 92ea0f08b49c8814fab06cc37dc8bea19a89bd8f
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)
reviewersbackout
bugs1296793, 1299908
milestone49.0
backs out517b38838e09a0778df87a0163e0ef8f2bedadc7
Backed out changeset 517b38838e09 (bug 1296793) for causing bug 1299908. a=backout
layout/base/FrameLayerBuilder.cpp
--- a/layout/base/FrameLayerBuilder.cpp
+++ b/layout/base/FrameLayerBuilder.cpp
@@ -3805,17 +3805,17 @@ ContainerState::ProcessDisplayItems(nsDi
     if (layerState == LAYER_INACTIVE &&
         nsDisplayItem::ForceActiveLayers()) {
       layerState = LAYER_ACTIVE;
     }
 
     bool forceInactive;
     AnimatedGeometryRoot* animatedGeometryRoot;
     AnimatedGeometryRoot* animatedGeometryRootForClip = nullptr;
-    if (mFlattenToSingleLayer && layerState != LAYER_ACTIVE_FORCE) {
+    if (mFlattenToSingleLayer) {
       forceInactive = true;
       animatedGeometryRoot = lastAnimatedGeometryRoot;
     } else {
       forceInactive = false;
       if (mManager->IsWidgetLayerManager()) {
         animatedGeometryRoot = item->GetAnimatedGeometryRoot();
         animatedGeometryRootForClip = item->AnimatedGeometryRootForScrollMetadata();
       } else {
@@ -4806,17 +4806,22 @@ ContainerState::PostprocessRetainedLayer
   int32_t opaqueRegionForContainer = -1;
 
   for (int32_t i = mNewChildLayers.Length() - 1; i >= 0; --i) {
     NewLayerEntry* e = &mNewChildLayers.ElementAt(i);
     if (!e->mLayer) {
       continue;
     }
 
-    OpaqueRegionEntry* data = FindOpaqueRegionEntry(opaqueRegions, e->mAnimatedGeometryRoot);
+    // If mFlattenToSingleLayer is true, there isn't going to be any
+    // async scrolling so we can apply all our opaqueness to the same
+    // entry, the entry for mContainerAnimatedGeometryRoot.
+    AnimatedGeometryRoot* animatedGeometryRootForOpaqueness =
+        mFlattenToSingleLayer ? mContainerAnimatedGeometryRoot : e->mAnimatedGeometryRoot;
+    OpaqueRegionEntry* data = FindOpaqueRegionEntry(opaqueRegions, animatedGeometryRootForOpaqueness);
 
     SetupScrollingMetadata(e);
 
     if (hideAll) {
       e->mVisibleRegion.SetEmpty();
     } else if (!e->mLayer->IsScrollbarContainer()) {
       Maybe<ParentLayerIntRect> clipRect = GetStationaryClipInContainer(e->mLayer);
       if (clipRect && opaqueRegionForContainer >= 0 &&
@@ -4828,17 +4833,17 @@ ContainerState::PostprocessRetainedLayer
     }
 
     SetOuterVisibleRegionForLayer(e->mLayer,
                                   e->mVisibleRegion,
                                   e->mLayerContentsVisibleRect.width >= 0 ? &e->mLayerContentsVisibleRect : nullptr,
                                   e->mUntransformedVisibleRegion);
 
     if (!e->mOpaqueRegion.IsEmpty()) {
-      AnimatedGeometryRoot* animatedGeometryRootToCover = e->mAnimatedGeometryRoot;
+      AnimatedGeometryRoot* animatedGeometryRootToCover = animatedGeometryRootForOpaqueness;
       if (e->mOpaqueForAnimatedGeometryRootParent &&
           e->mAnimatedGeometryRoot->mParentAGR == mContainerAnimatedGeometryRoot) {
         animatedGeometryRootToCover = mContainerAnimatedGeometryRoot;
         data = FindOpaqueRegionEntry(opaqueRegions, animatedGeometryRootToCover);
       }
 
       if (!data) {
         if (animatedGeometryRootToCover == mContainerAnimatedGeometryRoot) {