Moving the mouse causes paints

RESOLVED FIXED in Firefox 58

Status

()

P1
normal
RESOLVED FIXED
2 years ago
a year ago

People

(Reporter: jrmuizel, Assigned: kats)

Tracking

(Blocks: 1 bug)

unspecified
mozilla58
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox58 fixed)

Details

(Whiteboard: [wr-mvp])

Attachments

(3 attachments, 1 obsolete attachment)

(Reporter)

Description

2 years ago
STR: go to a page that doesn't have any content that changes on mouse over. Move the mouse with the webrender profiler turned on. Notice that we're continuously painting.
Is there a way to tell from the profiler display if it's a repaint or a composite (i.e. new display list provided or not)?
Priority: -- → P2
Whiteboard: [wr-mvp]
(Reporter)

Comment 2

2 years ago
The profiler shows display list times. I believe these are 0 during recomposites which suggests that new display lists are being provided.
I chased this down while investigating bug 1404091. The repaints here happen because we always return false from EndEmptyTransaction when layers-free is enabled. If we properly support empty transactions then we can avoid repainting.
Depends on: 1382259
Also, for the record, the thing that is scheduling all the empty transactions upon moving the mouse is the code at http://searchfox.org/mozilla-central/rev/298033405057ca7aa5099153797467eceeaa08b5/layout/base/PresShell.cpp#6785
Posted patch WIP (obsolete) — Splinter Review
I thought this would fix it, but it doesn't. We're also getting a bunch of calls with PAINT_LAYERS set from [1] when the mouse moves. This happens both with and without webrender, but without webrender, it doesn't result in transactions (probably because DLBI realizes nothing has changed, and so filters it out). With webrender it results in transactions.

[1] http://searchfox.org/mozilla-central/rev/298033405057ca7aa5099153797467eceeaa08b5/view/nsViewManager.cpp#480
Assignee: nobody → bugmail
Status: NEW → ASSIGNED
Priority: P2 → P1
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #5)
> I thought this would fix it, but it doesn't. We're also getting a bunch of
> calls with PAINT_LAYERS set from [1] when the mouse moves. This happens both
> with and without webrender, but without webrender, it doesn't result in
> transactions (probably because DLBI realizes nothing has changed, and so
> filters it out). With webrender it results in transactions.

This is false. The PAINT_LAYERS call does happen, but both WR and non-WR filter it out. The patch does work as intended. However there is a separate issue that was interfering with my testing. I haven't gotten to the bottom of that yet but I'll file a separate bug for it.
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #6)
> I haven't gotten to the bottom
> of that yet but I'll file a separate bug for it.

I haven't been able to reproduce the problem again, but I suspect it's a race condition where sometimes we fall down into the codepath at [1], set a root color layer on the WRLM, and never unset it. That would result in us taking a different codepath in WRLM::EndEmptyTransaction from what I expected in my patch, and results in a transaction/paint. So the code deletion in bug 1403915 will fix it.

[1] http://searchfox.org/mozilla-central/rev/298033405057ca7aa5099153797467eceeaa08b5/layout/base/PresShell.cpp#6434
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)
Attachment #8914478 - Attachment is obsolete: true

Comment 12

2 years ago
mozreview-review
Comment on attachment 8914497 [details]
Bug 1403176 - Make WebRenderLayerManager reject pending scroll offset updates.

https://reviewboard.mozilla.org/r/185822/#review190784
Attachment #8914497 - Flags: review?(mstange) → review+

Comment 13

2 years ago
mozreview-review
Comment on attachment 8914498 [details]
Bug 1403176 - Add support for out-of-band APZ focus state propagation.

https://reviewboard.mozilla.org/r/185824/#review190786
Attachment #8914498 - Flags: review?(mstange) → review+

Comment 14

2 years ago
mozreview-review
Comment on attachment 8914499 [details]
Bug 1403176 - Turn on empty transactions support in layers-free WebRenderLayerManager.

https://reviewboard.mozilla.org/r/185826/#review190788
Attachment #8914499 - Flags: review?(mstange) → review+

Comment 15

2 years ago
Pushed by kgupta@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2369eb303658
Make WebRenderLayerManager reject pending scroll offset updates. r=mstange
https://hg.mozilla.org/integration/autoland/rev/28398a15ee23
Add support for out-of-band APZ focus state propagation. r=mstange
https://hg.mozilla.org/integration/autoland/rev/a8a5e1622e51
Turn on empty transactions support in layers-free WebRenderLayerManager. r=mstange
https://hg.mozilla.org/mozilla-central/rev/2369eb303658
https://hg.mozilla.org/mozilla-central/rev/28398a15ee23
https://hg.mozilla.org/mozilla-central/rev/a8a5e1622e51
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
status-firefox58: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
Depends on: 1406047
You need to log in before you can comment on or make changes to this bug.