Bug 1041510. We should try to flatten display items that don't have children too. r=roc
authorTimothy Nikkel <tnikkel@gmail.com>
Tue, 22 Jul 2014 15:37:26 -0500
changeset 195591 83e9ee5700bb5a8f21808ee9293211b7ea463846
parent 195590 7ce6d4ccc804ac43f96657308c82ff916e198c16
child 195592 b102fe6b3565676fbf59c9664f14e5149ec4db1e
push id27188
push usercbook@mozilla.com
push dateWed, 23 Jul 2014 13:53:43 +0000
treeherdermozilla-central@785acfd2ae48 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs1041510
milestone34.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 1041510. We should try to flatten display items that don't have children too. r=roc Scroll info layers in particular never have children and we want to flatten them.
layout/base/FrameLayerBuilder.cpp
--- a/layout/base/FrameLayerBuilder.cpp
+++ b/layout/base/FrameLayerBuilder.cpp
@@ -2672,22 +2672,20 @@ ContainerState::ProcessDisplayItems(nsDi
         item = aboveItem;
       } else {
         break;
       }
     }
 
     nsDisplayList* itemSameCoordinateSystemChildren
       = item->GetSameCoordinateSystemChildren();
-    if (itemSameCoordinateSystemChildren) {
-      if (item->ShouldFlattenAway(mBuilder)) {
-        aList->AppendToBottom(itemSameCoordinateSystemChildren);
-        item->~nsDisplayItem();
-        continue;
-      }
+    if (item->ShouldFlattenAway(mBuilder)) {
+      aList->AppendToBottom(itemSameCoordinateSystemChildren);
+      item->~nsDisplayItem();
+      continue;
     }
 
     savedItems.AppendToTop(item);
 
     NS_ASSERTION(mAppUnitsPerDevPixel == AppUnitsPerDevPixel(item),
       "items in a container layer should all have the same app units per dev pixel");
 
     nsIntRect itemVisibleRect =