Bug 1215180 - Modify the scale calculate in order to prevent blurry of animation transform. r=mstange
This commit is contained in:
@@ -5105,9 +5105,11 @@ ChooseScaleAndSetTransform(FrameLayerBuilder* aLayerBuilder,
|
|||||||
scale = nsLayoutUtils::ComputeSuitableScaleForAnimation(
|
scale = nsLayoutUtils::ComputeSuitableScaleForAnimation(
|
||||||
aContainerFrame, aVisibleRect.Size(),
|
aContainerFrame, aVisibleRect.Size(),
|
||||||
displaySize);
|
displaySize);
|
||||||
// multiply by the scale inherited from ancestors
|
// multiply by the scale inherited from ancestors--we use a uniform
|
||||||
scale.width *= aIncomingScale.mXScale;
|
// scale factor to prevent blurring when the layer is rotated.
|
||||||
scale.height *= aIncomingScale.mYScale;
|
float incomingScale = std::max(aIncomingScale.mXScale, aIncomingScale.mYScale);
|
||||||
|
scale.width *= incomingScale;
|
||||||
|
scale.height *= incomingScale;
|
||||||
} else {
|
} else {
|
||||||
// Scale factors are normalized to a power of 2 to reduce the number of resolution changes
|
// Scale factors are normalized to a power of 2 to reduce the number of resolution changes
|
||||||
scale = RoundToFloatPrecision(ThebesMatrix(transform2d).ScaleFactors(true));
|
scale = RoundToFloatPrecision(ThebesMatrix(transform2d).ScaleFactors(true));
|
||||||
|
|||||||
Reference in New Issue
Block a user