diff --git a/layout/style/AnimationCommon.cpp b/layout/style/AnimationCommon.cpp index a2b1affe4c53..22814033a29e 100644 --- a/layout/style/AnimationCommon.cpp +++ b/layout/style/AnimationCommon.cpp @@ -447,14 +447,6 @@ AnimationCollection::CanAnimatePropertyOnCompositor( CanAnimateFlags aFlags) { bool shouldLog = nsLayoutUtils::IsAnimationLoggingEnabled(); - if (!nsLayoutUtils::AreAsyncAnimationsEnabled()) { - if (shouldLog) { - nsCString message; - message.AppendLiteral("Performance warning: Async animations are disabled"); - LogAsyncAnimationFailure(message); - } - return false; - } nsIFrame* frame = nsLayoutUtils::GetStyleFrame(aElement); if (IsGeometricProperty(aProperty)) { @@ -516,6 +508,15 @@ bool AnimationCollection::CanPerformOnCompositorThread( CanAnimateFlags aFlags) const { + if (!nsLayoutUtils::AreAsyncAnimationsEnabled()) { + if (nsLayoutUtils::IsAnimationLoggingEnabled()) { + nsCString message; + message.AppendLiteral("Performance warning: Async animations are disabled"); + LogAsyncAnimationFailure(message); + } + return false; + } + dom::Element* element = GetElementToRestyle(); if (!element) { return false;