mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-28 04:35:33 +00:00
Bug 1321412 - If the animated content is already fully rendered, enable async animation regardless of size. r=mattwoodrow
MozReview-Commit-ID: OePAkUqp2Q --HG-- extra : rebase_source : af5869826b827c1482e97c97a4204597f2c95f47
This commit is contained in:
parent
2e3caa982c
commit
6579cf5fe9
@ -6260,6 +6260,13 @@ nsDisplayTransform::ShouldPrerenderTransformedContent(nsDisplayListBuilder* aBui
|
||||
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();
|
||||
@ -6274,7 +6281,6 @@ nsDisplayTransform::ShouldPrerenderTransformedContent(nsDisplayListBuilder* aBui
|
||||
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) {
|
||||
|
Loading…
Reference in New Issue
Block a user