зеркало из https://github.com/mozilla/gecko-dev.git
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 : d50afa18a64fc2b124b3d7f79faaf37144403ec0
This commit is contained in:
Родитель
f9bf984071
Коммит
6e64d4c666
|
@ -6261,6 +6261,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();
|
||||
|
@ -6275,7 +6282,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) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче