Closed
Bug 1282312
Opened 8 years ago
Closed 8 years ago
invalidation problems with combination of -moz-element() and 3D transforms
Categories
(Core :: Web Painting, defect)
Core
Web Painting
Tracking
()
RESOLVED
FIXED
mozilla50
Tracking | Status | |
---|---|---|
firefox50 | --- | fixed |
People
(Reporter: dbaron, Assigned: mattwoodrow)
References
Details
Attachments
(5 files, 2 obsolete files)
2.05 KB,
text/html
|
Details | |
5.90 KB,
patch
|
birtles
:
review+
|
Details | Diff | Splinter Review |
2.57 KB,
patch
|
Details | Diff | Splinter Review | |
5.62 KB,
patch
|
mattwoodrow
:
review+
|
Details | Diff | Splinter Review |
4.58 KB,
patch
|
hiro
:
review+
|
Details | Diff | Splinter Review |
From this example:
https://twitter.com/anatudor/status/746501526168936448
http://codepen.io/thebabydino/pen/JKEyBv/
we appear to have problems with invalidation given combinations of 3d transforms and -moz-element().
The lower half of the testcase should be spinning just like the top half (in reflection), but instead it only updates occasionally.
Flags: needinfo?(matt.woodrow)
Comment 1•8 years ago
|
||
Regression window for the blue one on the left:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=895f66c4eada&tochange=85f561c755f6
Regression window for the red one on the right:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=f7c89de3ab43&tochange=3f0587ce1774
Reporter | ||
Comment 2•8 years ago
|
||
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → matt.woodrow
Flags: needinfo?(matt.woodrow)
Assignee | ||
Comment 3•8 years ago
|
||
There's a few bugs here, I have patches for it, just need to write some tests.
Our way of handling invalidation with -moz-element is pretty fragile, it would be much better if we could hook into DLBI and get normal invalidation. I filed bug 1284053 for this.
See Also: → 1284053
Assignee | ||
Comment 4•8 years ago
|
||
I'm having issues writing a test for this. We seem to only miss the invalidation for intermediate steps of an animation, once we hit the end then we invalidate correctly.
We can't easily have a reftest that captures the intermediate state of an animation.
Assignee | ||
Comment 5•8 years ago
|
||
Attachment #8768945 -
Flags: review?(mstange)
Assignee | ||
Comment 6•8 years ago
|
||
Attachment #8768946 -
Flags: review?(bbirtles)
Assignee | ||
Comment 7•8 years ago
|
||
Comment 8•8 years ago
|
||
Comment on attachment 8768946 [details] [diff] [review]
Disable async animations when we have rendering observers
Review of attachment 8768946 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/animation/test/chrome/test_running_on_compositor.html
@@ +180,5 @@
> + assert_equals(animation.isRunningOnCompositor, false,
> + 'Animation reports that it is NOT running on the compositor'
> + + ' when referenced by -moz-element');
> + });
> +}, 'isRunningOnCompositor is false while in the delay phase');
This comment needs to be updated to say something about referencing with -moz-element.
Really, though, we should add this test to test_animation_performance_warning.html (along with a test that checks that the warning is cleared when the condition is resolved). test_animation_performance_warning.html can be a little bit hard to follow, however, so perhaps Hiro can help with that.
Attachment #8768946 -
Flags: review?(bbirtles) → review+
Comment 9•8 years ago
|
||
Hiro, would you be able to help Matt write a test for test_animation_performance_warning.html for this new warning? (If we do that, perhaps we don't need the additional test in test_running_on_compositor.html from the second patch in this series.)
Flags: needinfo?(hiikezoe)
Comment 10•8 years ago
|
||
We can write a similar test just like this[1].
[1] http://hg.mozilla.org/mozilla-central/file/94cce4e79310/dom/animation/test/chrome/test_animation_performance_warning.html#l645
But, in this case, we need to add/remove id attribute instead of adding/removing style.
Flags: needinfo?(hiikezoe)
Assignee | ||
Comment 11•8 years ago
|
||
Attachment #8769570 -
Flags: review?(hiikezoe)
Comment 12•8 years ago
|
||
Comment on attachment 8769570 [details] [diff] [review]
Async animations test
Review of attachment 8769570 [details] [diff] [review]:
-----------------------------------------------------------------
This basically looks good to me. But in this case I'd prefer to create a separate promise_test and create the div element for -moz-element in the test so that we can avoid any side effects of the new div element.
Attachment #8769570 -
Flags: review?(hiikezoe)
Comment 13•8 years ago
|
||
Comment on attachment 8768945 [details] [diff] [review]
Make sure we invalidate rendering observers when triggering paints
Review of attachment 8768945 [details] [diff] [review]:
-----------------------------------------------------------------
Sorry for the delay. I actually had this mostly reviewed last week but forgot to finish my comment and submit it...
::: layout/generic/nsFrame.cpp
@@ +5716,5 @@
> void
> nsIFrame::SchedulePaint(PaintType aType)
> {
> + nsSVGEffects::InvalidateDirectRenderingObservers(this);
> + if (!nsLayoutUtils::IsPopup(this)) {
Instead of checking IsPopup on every iteration, you could get the display root frame first, and then just walk up until you encounter it. For the common case that we're not in a popup, doing so would be faster because nsLayoutUtils::GetDisplayRootFrame has a fast path to return the root frame. The in-popup case might be slightly slower but that shouldn't matter. (When I started writing this comment last week I knew why it would be slower, but I've forgotten the reason in the meantime.)
@@ +5743,5 @@
>
> Layer* layer = FrameLayerBuilder::GetDedicatedLayer(this, aDisplayItemKey);
>
> + nsSVGEffects::InvalidateDirectRenderingObservers(this);
> + if (!nsLayoutUtils::IsPopup(this)) {
This loop looks the same as the one above. Can you share?
Attachment #8768945 -
Flags: review?(mstange) → review+
Assignee | ||
Comment 14•8 years ago
|
||
Updated patch, carrying r=mstange.
Attachment #8768945 -
Attachment is obsolete: true
Attachment #8775871 -
Flags: review+
Assignee | ||
Comment 15•8 years ago
|
||
Attachment #8769570 -
Attachment is obsolete: true
Attachment #8775872 -
Flags: review?(hiikezoe)
Comment 16•8 years ago
|
||
Comment on attachment 8775872 [details] [diff] [review]
Async animations test
Review of attachment 8775872 [details] [diff] [review]:
-----------------------------------------------------------------
Thanks for fixing the test!
::: dom/animation/test/chrome/test_animation_performance_warning.html
@@ +684,5 @@
>
> + gPerformanceWarningTestsId.forEach(function(subtest) {
> + promise_test(function(t) {
> + if (subtest.createelement) {
> + var referenced = addDiv(t, { style: subtest.createelement });
Is this 'var referenced' really needed?
Attachment #8775872 -
Flags: review?(hiikezoe) → review+
Comment 17•8 years ago
|
||
Pushed by mwoodrow@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/24fc0e07876b
Part 1: Invalidate direct rendering observers for a frame when we schedule a paint due to changes. r=mstange
https://hg.mozilla.org/integration/mozilla-inbound/rev/dbe1b11f09d3
Part 2: Disable async animations when we have rendering observers. r=bbirtles
https://hg.mozilla.org/integration/mozilla-inbound/rev/09874746f3e0
Part 3: Add test for disabling of async animations with rendering observers. r=hiro
Comment 18•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/24fc0e07876b
https://hg.mozilla.org/mozilla-central/rev/dbe1b11f09d3
https://hg.mozilla.org/mozilla-central/rev/09874746f3e0
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
Updated•6 years ago
|
Component: Layout: View Rendering → Layout: Web Painting
You need to log in
before you can comment on or make changes to this bug.
Description
•