Bug 1343057 - Part 2: Disable AA for layers with animation in effect. r=mattwoodrow

--HG--
extra : rebase_source : 1de5a9f4a4e18ba8624433a43a22b8ac47a9cc91
This commit is contained in:
Thinker K.F. Li 2017-03-29 09:38:00 -04:00
Родитель c3c86f2b4d
Коммит 53cb8600b7
3 изменённых файлов: 19 добавлений и 6 удалений

Просмотреть файл

@ -1310,11 +1310,16 @@ nsIFrame::IsTransformed() const
return ((mState & NS_FRAME_MAY_BE_TRANSFORMED) &&
(StyleDisplay()->HasTransform(this) ||
IsSVGTransformed() ||
(mContent &&
nsLayoutUtils::HasAnimationOfProperty(this,
eCSSProperty_transform) &&
IsFrameOfType(eSupportsCSSTransforms) &&
mContent->GetPrimaryFrame() == this)));
HasAnimationOfTransform()));
}
bool
nsIFrame::HasAnimationOfTransform() const
{
return mContent &&
nsLayoutUtils::HasAnimationOfProperty(this, eCSSProperty_transform) &&
IsFrameOfType(eSupportsCSSTransforms) &&
mContent->GetPrimaryFrame() == this;
}
bool

Просмотреть файл

@ -1641,6 +1641,11 @@ public:
*/
bool IsTransformed() const;
/**
* True if this frame has any animation of transform in effect.
*/
bool HasAnimationOfTransform() const;
/**
* Returns true if the frame is translucent or the frame has opacity
* animations for the purposes of creating a stacking context.

Просмотреть файл

@ -5541,7 +5541,10 @@ ChooseScaleAndSetTransform(FrameLayerBuilder* aLayerBuilder,
if ((aLayerBuilder->IsBuildingRetainedLayers() &&
(!canDraw2D || transform2d.HasNonIntegerTranslation())) ||
aContainerFrame->Extend3DContext() ||
aContainerFrame->Combines3DTransformWithAncestors()) {
aContainerFrame->Combines3DTransformWithAncestors() ||
// For async transform animation, the value would be changed at
// any time, integer translation is not always true.
aContainerFrame->HasAnimationOfTransform()) {
aOutgoingScale.mDisableSubpixelAntialiasingInDescendants = true;
}
return true;