Bug 1509272 - Always use new transform display items r=mattwoodrow
authorMiko Mynttinen <mikokm@gmail.com>
Fri, 25 Jan 2019 04:03:01 +0000
changeset 515430 9e7fe63b341a5a3a0479df93d6ebe2ded42f586d
parent 515429 e0034670b26aaea119876ed739167136b75e1ec9
child 515431 0509a9edc58aa8f5a2a51e9684f93c913d6d55ab
push id1953
push userffxbld-merge
push dateMon, 11 Mar 2019 12:10:20 +0000
treeherdermozilla-release@9c35dcbaa899 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs1509272
milestone66.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 1509272 - Always use new transform display items r=mattwoodrow Differential Revision: https://phabricator.services.mozilla.com/D17425
layout/painting/RetainedDisplayListBuilder.cpp
layout/painting/nsDisplayList.cpp
--- a/layout/painting/RetainedDisplayListBuilder.cpp
+++ b/layout/painting/RetainedDisplayListBuilder.cpp
@@ -442,16 +442,21 @@ class MergeState {
 
     if (type == DisplayItemType::TYPE_MASK ||
         type == DisplayItemType::TYPE_FILTER ||
         type == DisplayItemType::TYPE_SVG_WRAPPER) {
       // SVG items have some invalidation issues, see bugs 1494110 and 1494663.
       return true;
     }
 
+    if (type == DisplayItemType::TYPE_TRANSFORM) {
+      // Prerendering of transforms can change without frame invalidation.
+      return true;
+    }
+
     return false;
   }
 
   RetainedDisplayList Finalize() {
     for (size_t i = 0; i < mOldDAG.Length(); i++) {
       if (mOldItems[i].IsUsed()) {
         continue;
       }
--- a/layout/painting/nsDisplayList.cpp
+++ b/layout/painting/nsDisplayList.cpp
@@ -4731,16 +4731,17 @@ void nsDisplayBackgroundColor::HitTest(n
   }
 
   aOutFrames->AppendElement(mFrame);
 }
 
 void nsDisplayBackgroundColor::WriteDebugInfo(std::stringstream& aStream) {
   aStream << " (rgba " << mColor.r << "," << mColor.g << "," << mColor.b << ","
           << mColor.a << ")";
+  aStream << " backgroundRect" << mBackgroundRect;
 }
 
 already_AddRefed<Layer> nsDisplayClearBackground::BuildLayer(
     nsDisplayListBuilder* aBuilder, LayerManager* aManager,
     const ContainerLayerParameters& aParameters) {
   RefPtr<ColorLayer> layer = static_cast<ColorLayer*>(
       aManager->GetLayerBuilder()->GetLeafLayerFor(aBuilder, this));
   if (!layer) {
@@ -8377,16 +8378,19 @@ void nsDisplayTransform::WriteDebugInfo(
     aStream << " 3d-context-leaf";
   }
   if (mFrame->Extend3DContext()) {
     aStream << " extends-3d-context";
   }
   if (mFrame->Combines3DTransformWithAncestors()) {
     aStream << " combines-3d-with-ancestors";
   }
+
+  aStream << " allowAsync(" << (mAllowAsyncAnimation ? "true" : "false") << ")";
+  aStream << " childrenBuildingRect" << mChildrenBuildingRect;
 }
 
 nsDisplayPerspective::nsDisplayPerspective(nsDisplayListBuilder* aBuilder,
                                            nsIFrame* aFrame,
                                            nsDisplayList* aList)
     : nsDisplayHitTestInfoItem(aBuilder, aFrame),
       mList(aBuilder, aFrame, aList, true) {
   MOZ_ASSERT(mList.GetChildren()->Count() == 1);