Closed Bug 1421380 Opened 7 years ago Closed 7 years ago

Turn on webrender hit-test by default


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

Other Branch



Tracking Status
firefox60 --- fixed


(Reporter: kats, Assigned: kats)


(Blocks 1 open bug)


(Whiteboard: [wr-reserve] [gfx-noted])


(2 files)

Making a new meta-ish bug for the WR hit-test stuff. There are some more correctness issues that need fixing, and I'll hang them off this because I have other patches I want to land in bug 1389146.

Also we'll need the webrender-side issues with hit-testing fixed before we can turn it on, and this bug can track those as well.
This can go into the reserve list for now.
Whiteboard: [gfx-noted][wr-mvp][triage] → [gfx-noted][wr-reserve][triage]
Whiteboard: [gfx-noted][wr-reserve][triage] → [wr-reserve] [gfx-noted]
Kats, do you have performance numbers for EndTransaction times with and without this change?
No, I didn't do any benchmarking beyond just comparing MazeSolver and some MotionMark subtest numbers.
Assignee: nobody → bugmail
Blocks: 1416847
IMO the only thing I really want to fix before turning this on is bug 1425451, because that race condition can produce unreliable behaviour that is difficult to diagnose and debug. The mochitest failures I'm ok with just marking fails-if for now.

Looks good.

For the record I wanted to turn on the test_group_hittest.html because it now passes reliably for me locally. However my previous try push [2] still showed it failing. The screenshot of the failure shows that the test page hasn't even loaded, it's still showing the previous test - so I think the failure is not due to the hit-testing code per se, but more so the framework around loading the pages and waiting for APZ and whatnot. For now I'm leaving that test disabled as well in the interests of getting this feature turned on sooner.

Comment on attachment 8945503 [details]
Bug 1421380 - Enable gfx.webrender.hit-test by default.
Attachment #8945503 - Flags: review?(jmuizelaar) → review+
Pushed by
Enable gfx.webrender.hit-test by default. r=jrmuizel
I've requested that this be backed out until we have a chance to get to the bottom of bug 1433191.
Depends on: 1433191
Flags: needinfo?(bugmail)
Thanks :)
Flags: needinfo?(bugmail)
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
The backout merged to m-c also.
Resolution: FIXED → ---
I haven't relanded this yet because my latest try push is showing debug assertions across the board:

Will need to investigate.
Depends on: 1433787
(In reply to Kartikaya Gupta ( from comment #14)
> I haven't relanded this yet because my latest try push is showing debug
> assertions across the board:

The problem is simple enough - the WR hit-test triggers rendering/publishing of frames, which sends NewFrameReady notifications to gecko. However gecko assumes that all the frames it gets were requested by it, and manages two counters (the pending frame count and the rendering frame count) based on this assumption. The extra frames produced by hit-testing violates the assumptions here and causes an assertion failure.

At first I wanted to fix this by suppressing the NewFrameReady activity on the gecko side when we're inside a hit-test call (via a RAII helper or similar). The problem with this is that we have recently sent a GenerateFrame request from the gecko side and the NewFrameReady notification from that might arrive while we're inside the suppression block. In this case we would incorrectly suppress a frame ready notification that we should actually be handling. If this works it would be highly dependent on which messages are sent from which threads which is a pretty brittle solution and I don't want to go down that road.

Another solution, which seems more viable, is to update the call at [1] so that it is either skipped, or the last arg is set to false, in the case where the render is due to hit-testing. Seems a bit like cheating but it would be a band-aid until we get the "proper" fix of doing build_scene on a worker thread (and then eliminating this render-due-to-hit-testing entirely).

Try push looks good, tested the build locally as well and it seems good.
Depends on: 1433567
Comment on attachment 8946421 [details]
Bug 1421380 - Don't do a composite of WR rendered frames unless a composite is requested.

Makes sense.
Attachment #8946421 - Flags: review?(nical.bugzilla) → review+
Pushed by
Don't do a composite of WR rendered frames unless a composite is requested. r=nical
Enable gfx.webrender.hit-test by default. r=jrmuizel
Depends on: 1434682
Depends on: 1434840
Depends on: 1434846
Regressions: 1563622
Regressions: 1679125
You need to log in before you can comment on or make changes to this bug.