Closed
Bug 779385
Opened 13 years ago
Closed 13 years ago
Help CSS authors diagnose why animations aren't async
Categories
(Core :: Layout, defect)
Core
Layout
Tracking
()
RESOLVED
FIXED
mozilla17
People
(Reporter: dzbarsky, Assigned: dzbarsky)
Details
Attachments
(1 file, 1 obsolete file)
2.45 KB,
patch
|
cjones
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•13 years ago
|
||
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)
Assignee | ||
Comment 3•13 years ago
|
||
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+
Assignee | ||
Comment 5•13 years ago
|
||
Comment 6•13 years ago
|
||
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.
Description
•