Backed out changeset a8e8ba250d62 (bug 1321412)
authorSebastian Hengst <archaeopteryx@coole-files.de>
Fri, 09 Dec 2016 22:26:41 +0100
changeset 325554 d008de7ea68cde2e59be1fd78b09e655a8aa5d9e
parent 325553 d112c18816637fdb5e23a70a96e4647bc5075f5f
child 325555 f8a8676709152e98773ed5803a2a785a50d6e3c8
push id24
push usermaklebus@msu.edu
push dateTue, 20 Dec 2016 03:11:33 +0000
bugs1321412
milestone53.0a1
backs outa8e8ba250d6218fbc9a5aa6cb63b263bb0ab5d32
Backed out changeset a8e8ba250d62 (bug 1321412)
layout/painting/nsDisplayList.cpp
--- a/layout/painting/nsDisplayList.cpp
+++ b/layout/painting/nsDisplayList.cpp
@@ -6256,37 +6256,31 @@ nsDisplayTransform::ShouldPrerenderTrans
     EffectCompositor::SetPerformanceWarning(
       aFrame, eCSSProperty_transform,
       AnimationPerformanceWarning(
         AnimationPerformanceWarning::Type::TransformFrameInactive));
 
     return NoPrerender;
   }
 
-  // If the incoming dirty rect already contains the entire overflow area,
-  // we are already rendering the entire content.
-  nsRect overflow = aFrame->GetVisualOverflowRectRelativeToSelf();
-  if (aDirtyRect->Contains(overflow)) {
-    return FullPrerender;
-  }
-
   float viewportRatioX = gfxPrefs::AnimationPrerenderViewportRatioLimitX();
   float viewportRatioY = gfxPrefs::AnimationPrerenderViewportRatioLimitY();
   uint32_t absoluteLimitX = gfxPrefs::AnimationPrerenderAbsoluteLimitX();
   uint32_t absoluteLimitY = gfxPrefs::AnimationPrerenderAbsoluteLimitY();
   nsSize refSize = aBuilder->RootReferenceFrame()->GetSize();
   // Only prerender if the transformed frame's size is <= a multiple of the
   // reference frame size (~viewport), and less than an absolute limit.
   // Both the ratio and the absolute limit are configurable.
   nsSize relativeLimit(nscoord(refSize.width * viewportRatioX),
                        nscoord(refSize.height * viewportRatioY));
   nsSize absoluteLimit(aFrame->PresContext()->DevPixelsToAppUnits(absoluteLimitX),
                        aFrame->PresContext()->DevPixelsToAppUnits(absoluteLimitY));
   nsSize maxSize = Min(relativeLimit, absoluteLimit);
   gfxSize scale = nsLayoutUtils::GetTransformToAncestorScale(aFrame);
+  nsRect overflow = aFrame->GetVisualOverflowRectRelativeToSelf();
   nsSize frameSize = nsSize(overflow.Size().width * scale.width,
                             overflow.Size().height * scale.height);
   if (frameSize <= maxSize) {
     *aDirtyRect = overflow;
     return FullPrerender;
   } else if (gfxPrefs::PartiallyPrerenderAnimatedContent()) {
     *aDirtyRect = ComputePartialPrerenderArea(*aDirtyRect, overflow, maxSize);
     return PartialPrerender;