зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1462497 - Part 3: Don't condition useOpacity on values that might change silently between paints (HasAnimationsForCompositor, and the will-change budget). r=hiro
MozReview-Commit-ID: Kry5YIAIAHt --HG-- extra : rebase_source : ccc1085ad534da882a9f5ef03a5b7675bc39ed08
This commit is contained in:
Родитель
c77fe6d1bd
Коммит
44fcf86181
|
@ -2954,9 +2954,12 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
|
||||||
// layer (for async animations), see
|
// layer (for async animations), see
|
||||||
// nsSVGIntegrationsUtils::PaintMaskAndClipPath or
|
// nsSVGIntegrationsUtils::PaintMaskAndClipPath or
|
||||||
// nsSVGIntegrationsUtils::PaintFilter.
|
// nsSVGIntegrationsUtils::PaintFilter.
|
||||||
|
// Use MayNeedActiveLayer to decide, since we don't want to condition the wrapping
|
||||||
|
// display item on values that might change silently between paints (opacity activity
|
||||||
|
// can depend on the will-change budget).
|
||||||
bool useOpacity = HasVisualOpacity(effectSet) &&
|
bool useOpacity = HasVisualOpacity(effectSet) &&
|
||||||
!nsSVGUtils::CanOptimizeOpacity(this) &&
|
!nsSVGUtils::CanOptimizeOpacity(this) &&
|
||||||
(!usingSVGEffects || nsDisplayOpacity::NeedsActiveLayer(aBuilder, this));
|
(!usingSVGEffects || nsDisplayOpacity::MayNeedActiveLayer(this));
|
||||||
bool useBlendMode = effects->mMixBlendMode != NS_STYLE_BLEND_NORMAL;
|
bool useBlendMode = effects->mMixBlendMode != NS_STYLE_BLEND_NORMAL;
|
||||||
bool useStickyPosition = disp->mPosition == NS_STYLE_POSITION_STICKY &&
|
bool useStickyPosition = disp->mPosition == NS_STYLE_POSITION_STICKY &&
|
||||||
IsScrollFrameActive(aBuilder,
|
IsScrollFrameActive(aBuilder,
|
||||||
|
|
|
@ -6526,6 +6526,12 @@ nsDisplayOpacity::NeedsActiveLayer(nsDisplayListBuilder* aBuilder, nsIFrame* aFr
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* static */ bool
|
||||||
|
nsDisplayOpacity::MayNeedActiveLayer(nsIFrame* aFrame)
|
||||||
|
{
|
||||||
|
return ActiveLayerTracker::IsStyleMaybeAnimated(aFrame, eCSSProperty_opacity);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
nsDisplayOpacity::ApplyOpacity(nsDisplayListBuilder* aBuilder,
|
nsDisplayOpacity::ApplyOpacity(nsDisplayListBuilder* aBuilder,
|
||||||
float aOpacity,
|
float aOpacity,
|
||||||
|
|
|
@ -5386,6 +5386,7 @@ public:
|
||||||
bool OpacityAppliedToChildren() const { return mOpacityAppliedToChildren; }
|
bool OpacityAppliedToChildren() const { return mOpacityAppliedToChildren; }
|
||||||
|
|
||||||
static bool NeedsActiveLayer(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame);
|
static bool NeedsActiveLayer(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame);
|
||||||
|
static bool MayNeedActiveLayer(nsIFrame* aFrame);
|
||||||
NS_DISPLAY_DECL_NAME("Opacity", TYPE_OPACITY)
|
NS_DISPLAY_DECL_NAME("Opacity", TYPE_OPACITY)
|
||||||
virtual void WriteDebugInfo(std::stringstream& aStream) override;
|
virtual void WriteDebugInfo(std::stringstream& aStream) override;
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче