Bug 1506988 - Don't incorporate properties that are prevented from running on the compositor in GetPropertiesForCompositor. r=birtles

Now we no longer update the corresponding display items for the animations that
are prevented from running on the compositor if the animations themselves don't
generate any change hints, e.g the same value is specified in both 'from' and
'to' keyframes.  So that we can enable the reftests that we had been suffering
from continuous MozAfterPaint events.

Depends on D12397

Differential Revision: https://phabricator.services.mozilla.com/D12369

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Hiroyuki Ikezoe 2018-11-22 03:57:59 +00:00
Родитель 852cca0069
Коммит dec4d0e964
4 изменённых файлов: 30 добавлений и 8 удалений

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

@ -296,7 +296,8 @@ KeyframeEffect::GetEffectiveAnimationOfProperty(nsCSSPropertyID aProperty,
}
nsCSSPropertyIDSet
KeyframeEffect::GetPropertiesForCompositor(const EffectSet& aEffects) const
KeyframeEffect::GetPropertiesForCompositor(EffectSet& aEffects,
const nsIFrame* aFrame) const
{
MOZ_ASSERT(
&aEffects ==
@ -314,9 +315,17 @@ KeyframeEffect::GetPropertiesForCompositor(const EffectSet& aEffects) const
if (!compositorAnimatables.HasProperty(property.mProperty)) {
continue;
}
if (IsEffectiveProperty(aEffects, property.mProperty)) {
properties.AddProperty(property.mProperty);
AnimationPerformanceWarning::Type warning;
KeyframeEffect::MatchForCompositor matchResult =
IsMatchForCompositor(property.mProperty, aFrame, aEffects, warning);
if (matchResult ==
KeyframeEffect::MatchForCompositor::NoAndBlockThisProperty ||
matchResult == KeyframeEffect::MatchForCompositor::No) {
continue;
}
properties.AddProperty(property.mProperty);
}
return properties;
}

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

@ -219,7 +219,13 @@ public:
// NOTE: This function is basically called for all KeyframeEffects on an
// element thus it takes |aEffects| to avoid multiple calls of
// EffectSet::GetEffect().
nsCSSPropertyIDSet GetPropertiesForCompositor(const EffectSet& aEffects) const;
//
// NOTE(2): This function does NOT check that animations are permitted on
// |aFrame|. It is the responsibility of the caller to first call
// EffectCompositor::AllowCompositorAnimationsOnFrame for |aFrame|, or use
// nsLayoutUtils::GetAnimationPropertiesForCompositor instead.
nsCSSPropertyIDSet GetPropertiesForCompositor(EffectSet& aEffects,
const nsIFrame* aFrame) const;
const InfallibleTArray<AnimationProperty>& Properties() const
{

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

@ -339,8 +339,15 @@ nsLayoutUtils::GetAnimationPropertiesForCompositor(const nsIFrame* aFrame)
return properties;
}
AnimationPerformanceWarning::Type warning;
if (!EffectCompositor::AllowCompositorAnimationsOnFrame(aFrame,
*effects,
warning)) {
return properties;
}
for (const KeyframeEffect* effect : *effects) {
properties |= effect->GetPropertiesForCompositor(*effects);
properties |= effect->GetPropertiesForCompositor(*effects, aFrame);
}
return properties;

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

@ -71,9 +71,9 @@ fuzzy(0-3,0-99) == animate-cube-degrees.html animate-cube-degrees-ref.html # sub
== animate-cube-degrees-zoom.html animate-cube-degrees-zoom-ref.html
!= animate-cube-degrees-ref.html animate-cube-degrees-zoom-ref.html
fuzzy-if(gtkWidget,0-128,0-100) fuzzy-if(Android||OSX==1010||(gtkWidget&&layersGPUAccelerated),0-143,0-100) fuzzy-if(winWidget||OSX<1010,0-141,0-100) == preserves3d-nested.html preserves3d-nested-ref.html
skip-if(cocoaWidget&&webrender) fuzzy-if(cocoaWidget,0-128,0-9) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == animate-preserve3d-parent.html animate-preserve3d-ref.html # intermittently fuzzy on Mac
skip-if(cocoaWidget&&webrender) fuzzy-if(cocoaWidget,0-128,0-9) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == animate-preserve3d-child.html animate-preserve3d-ref.html # intermittently fuzzy on Mac, bug 1461311 for Android
skip-if(cocoaWidget&&webrender) == animate-backface-hidden.html about:blank # intermittent failure on MacOSX builds (bug 1505613)
fuzzy-if(cocoaWidget,0-128,0-9) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == animate-preserve3d-parent.html animate-preserve3d-ref.html # intermittently fuzzy on Mac
fuzzy-if(cocoaWidget,0-128,0-9) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == animate-preserve3d-child.html animate-preserve3d-ref.html # intermittently fuzzy on Mac, bug 1461311 for Android
== animate-backface-hidden.html about:blank
== 1245450-1.html green-rect.html
fuzzy(0-1,0-2000) == opacity-preserve3d-1.html opacity-preserve3d-1-ref.html
fuzzy(0-1,0-15000) == opacity-preserve3d-2.html opacity-preserve3d-2-ref.html