Closed Bug 779385 Opened 13 years ago Closed 13 years ago

Help CSS authors diagnose why animations aren't async

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla17

People

(Reporter: dzbarsky, Assigned: dzbarsky)

Details

Attachments

(1 file, 1 obsolete file)

No description provided.
Attached patch Patch (obsolete) — Splinter Review
Assignee: nobody → dzbarsky
Status: NEW → ASSIGNED
Attachment #647803 - Flags: review?(jones.chris.g)
Comment on attachment 647803 [details] [diff] [review] Patch >diff --git a/layout/style/AnimationCommon.cpp b/layout/style/AnimationCommon.cpp >+#include "prenv.h" >+#include "nsIConsoleService.h" >+#include "nsServiceManagerUtils.h" Don't need any of these. > bool > CommonElementAnimationData::CanAnimatePropertyOnCompositor(const dom::Element *aElement, > nsCSSProperty aProperty) > { >+ bool shouldLog = PR_GetEnv("MOZ_LOG_OMTA"); Make this a cached pref. >+ console->LogStringMessage( >+ NS_LITERAL_STRING("Cannot OMTA opacity because opacity animations are disabled").get()); Since we're cutting corners here, let's not give the wrong impression by logging this on the console. Instead, if the pref is set, write with printf_stderr(...). (That goes to logcat on android.) I'm not a big fan of this message. How about, Performance warning: Async animation of 'opacity' is disabled >+ NS_LITERAL_STRING("Cannot OMTA transform because of preserve-3d").get()); Gecko bug: Async animation of 'preserve-3d' transforms is not supported. See bug XXXXXX. >+ NS_LITERAL_STRING("Cannot OMTA transform because frame has SVG transform").get()); Gecko bug: Async 'transform' animations of frames with SVG transforms is not supported. See bug XXXXXX. >+ NS_LITERAL_STRING("Cannot OMTA transform because transform animations are disabled").get()); Performance warning: Async animation of 'transform' is disabled >+ const nsAFlatCString propName = nsCSSProps::GetStringValue(aProperty); >+ nsCString message; >+ message += "Cannot OMTA animation due to property: "; >+ message += propName; >+ console->LogStringMessage(NS_ConvertUTF8toUTF16(message).get()); Performance warning: Async animation cancelled because of unsupported property '%s' Where do we warn about disabling animations because the underlying frame isn't hitting our prerender optimization? That would be very useful.
Attachment #647803 - Flags: review?(jones.chris.g)
Attached patch PatchSplinter Review
Attachment #647803 - Attachment is obsolete: true
Attachment #648053 - Flags: review?(jones.chris.g)
Comment on attachment 648053 [details] [diff] [review] Patch >diff --git a/layout/style/AnimationCommon.cpp b/layout/style/AnimationCommon.cpp > bool > CommonElementAnimationData::CanAnimatePropertyOnCompositor(const dom::Element *aElement, > nsCSSProperty aProperty) > { >+ static bool sShouldLog; >+ static bool sShouldLogPrefCached = false; This is automatically initialized, can remove the assignment. r=me with that.
Attachment #648053 - Flags: review?(jones.chris.g) → review+
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: