Bug 979557: CanAnimatePropertyOnCompositor should return early when there's no OMT compositing, whether or not logging is enabled. r=dzbarsky

This shouldn't behave differently depending on whether or not logging is
enabled; that difference was introduced in bug 785648.
This commit is contained in:
L. David Baron 2014-03-04 20:13:22 -08:00
parent 383c71d957
commit b109d5c930

View File

@ -366,10 +366,12 @@ CommonElementAnimationData::CanAnimatePropertyOnCompositor(const dom::Element *a
CanAnimateFlags aFlags)
{
bool shouldLog = nsLayoutUtils::IsAnimationLoggingEnabled();
if (shouldLog && !gfxPlatform::OffMainThreadCompositingEnabled()) {
nsCString message;
message.AppendLiteral("Performance warning: Compositor disabled");
LogAsyncAnimationFailure(message);
if (!gfxPlatform::OffMainThreadCompositingEnabled()) {
if (shouldLog) {
nsCString message;
message.AppendLiteral("Performance warning: Compositor disabled");
LogAsyncAnimationFailure(message);
}
return false;
}