Closed Bug 1403176 Opened 7 years ago Closed 7 years ago

Moving the mouse causes paints

Categories

(Core :: Graphics: WebRender, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla58
Tracking Status
firefox58 --- fixed

People

(Reporter: jrmuizel, Assigned: kats)

References

Details

(Whiteboard: [wr-mvp])

Attachments

(3 files, 1 obsolete file)

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]
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.
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
Attached 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
Attachment #8914478 - Attachment is obsolete: true
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 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 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+
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
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: