зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 964ff414c560 (bug 1321412)
This commit is contained in:
Родитель
9717b63320
Коммит
54dfde20c4
|
@ -2208,14 +2208,11 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
|
|||
bool allowAsyncAnimation = false;
|
||||
if (isTransformed) {
|
||||
const nsRect overflow = GetVisualOverflowRectRelativeToSelf();
|
||||
nsDisplayTransform::PrerenderDecision decision =
|
||||
nsDisplayTransform::ShouldPrerenderTransformedContent(aBuilder, this);
|
||||
switch (decision) {
|
||||
case nsDisplayTransform::FullPrerender:
|
||||
if (nsDisplayTransform::ShouldPrerenderTransformedContent(aBuilder,
|
||||
this)) {
|
||||
dirtyRect = overflow;
|
||||
allowAsyncAnimation = true;
|
||||
break;
|
||||
case nsDisplayTransform::NoPrerender:
|
||||
} else {
|
||||
if (overflow.IsEmpty() && !extend3DContext) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -6226,9 +6226,9 @@ nsDisplayTransform::CanUseAsyncAnimations(nsDisplayListBuilder* aBuilder)
|
|||
return mAllowAsyncAnimation;
|
||||
}
|
||||
|
||||
/* static */ auto
|
||||
/* static */ bool
|
||||
nsDisplayTransform::ShouldPrerenderTransformedContent(nsDisplayListBuilder* aBuilder,
|
||||
nsIFrame* aFrame) -> PrerenderDecision
|
||||
nsIFrame* aFrame)
|
||||
{
|
||||
// Elements whose transform has been modified recently, or which
|
||||
// have a compositor-animated transform, can be prerendered. An element
|
||||
|
@ -6242,7 +6242,7 @@ nsDisplayTransform::ShouldPrerenderTransformedContent(nsDisplayListBuilder* aBui
|
|||
AnimationPerformanceWarning(
|
||||
AnimationPerformanceWarning::Type::TransformFrameInactive));
|
||||
|
||||
return NoPrerender;
|
||||
return false;
|
||||
}
|
||||
|
||||
nsSize refSize = aBuilder->RootReferenceFrame()->GetSize();
|
||||
|
@ -6258,7 +6258,7 @@ nsDisplayTransform::ShouldPrerenderTransformedContent(nsDisplayListBuilder* aBui
|
|||
if (frameSize <= refSize) {
|
||||
maxInAppUnits = aFrame->PresContext()->DevPixelsToAppUnits(4096);
|
||||
if (frameSize <= nsSize(maxInAppUnits, maxInAppUnits)) {
|
||||
return FullPrerender;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6278,7 +6278,7 @@ nsDisplayTransform::ShouldPrerenderTransformedContent(nsDisplayListBuilder* aBui
|
|||
nsPresContext::AppUnitsToIntCSSPixels(visual.height),
|
||||
nsPresContext::AppUnitsToIntCSSPixels(maxInAppUnits)
|
||||
}));
|
||||
return NoPrerender;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* If the matrix is singular, or a hidden backface is shown, the frame won't be visible or hit. */
|
||||
|
|
|
@ -4063,11 +4063,6 @@ class nsDisplayTransform: public nsDisplayItem
|
|||
};
|
||||
|
||||
public:
|
||||
enum PrerenderDecision {
|
||||
NoPrerender,
|
||||
FullPrerender
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns a matrix (in pixels) for the current frame. The matrix should be relative to
|
||||
* the current frame's coordinate space.
|
||||
|
@ -4281,11 +4276,11 @@ public:
|
|||
uint32_t aFlags,
|
||||
const nsRect* aBoundsOverride = nullptr);
|
||||
/**
|
||||
* Return FullPrerender when we should try to prerender the entire contents of the
|
||||
* Return true when we should try to prerender the entire contents of the
|
||||
* transformed frame even when it's not completely visible (yet).
|
||||
*/
|
||||
static PrerenderDecision ShouldPrerenderTransformedContent(nsDisplayListBuilder* aBuilder,
|
||||
nsIFrame* aFrame);
|
||||
static bool ShouldPrerenderTransformedContent(nsDisplayListBuilder* aBuilder,
|
||||
nsIFrame* aFrame);
|
||||
bool CanUseAsyncAnimations(nsDisplayListBuilder* aBuilder) override;
|
||||
|
||||
bool MayBeAnimated(nsDisplayListBuilder* aBuilder);
|
||||
|
|
Загрузка…
Ссылка в новой задаче