Bug 1425115 - Only add nsDisplayPerspective to mTransformFrame when retaining display list r=mattwoodrow
authorMiko Mynttinen <mikokm@gmail.com>
Wed, 13 Dec 2017 14:38:24 -0600
changeset 396523 3a31ae15e510b1f9775b05a5edb642ad0c247a9e
parent 396522 ab930b218ba8d57826624c8ca7913d7ecb5324db
child 396524 bdb11e2d4085dea3cf59674c20855feca1987d4e
push id33096
push useraciure@mozilla.com
push dateFri, 15 Dec 2017 21:50:36 +0000
treeherdermozilla-central@fff6ca61de45 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs1425115
milestone59.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 1425115 - Only add nsDisplayPerspective to mTransformFrame when retaining display list r=mattwoodrow MozReview-Commit-ID: HKey0DG2r4c
layout/painting/nsDisplayList.cpp
--- a/layout/painting/nsDisplayList.cpp
+++ b/layout/painting/nsDisplayList.cpp
@@ -9106,17 +9106,19 @@ nsDisplayPerspective::nsDisplayPerspecti
   : nsDisplayItem(aBuilder, aPerspectiveFrame)
   , mList(aBuilder, aPerspectiveFrame, aList)
   , mTransformFrame(aTransformFrame)
   , mIndex(aBuilder->PerspectiveItemIndex())
 {
   MOZ_ASSERT(mList.GetChildren()->Count() == 1);
   MOZ_ASSERT(mList.GetChildren()->GetTop()->GetType() == DisplayItemType::TYPE_TRANSFORM);
 
-  mTransformFrame->AddDisplayItem(this);
+  if (aBuilder->IsRetainingDisplayList()) {
+    mTransformFrame->AddDisplayItem(this);
+  }
 }
 
 already_AddRefed<Layer>
 nsDisplayPerspective::BuildLayer(nsDisplayListBuilder *aBuilder,
                                  LayerManager *aManager,
                                  const ContainerLayerParameters& aContainerParameters)
 {
   float appUnitsPerPixel = mFrame->PresContext()->AppUnitsPerDevPixel();