Closed Bug 1367911 Opened 7 years ago Closed 7 years ago

Hook up SendSetConfirmedTargetAPZC for webrender

Categories

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

Other Branch
enhancement

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: kats, Assigned: kats)

References

Details

(Whiteboard: [gfx-noted])

Attachments

(3 files)

Right now there is a codepath where APZ code on the main-thread needs to wait for layerization to happen, and then sends a message over to APZ on the compositor. It currently does this using the SendSetConfirmedTargetAPZC message on PLayerTransaction at [1]. However, the code assumes there is a PLayerTransaction - which is not the case with WebRender. Instead it should allow sending the message over PWebRenderBridge as well.

[1] http://searchfox.org/mozilla-central/rev/a14524a72de6f4ff738a5e784970f0730cea03d8/gfx/layers/apz/util/APZCCallbackHelper.cpp#711
Comment on attachment 8871735 [details]
Bug 1367911 - Refactor the SetConfirmedTargetAPZC function to take a layers id.

https://reviewboard.mozilla.org/r/143216/#review147156
Attachment #8871735 - Flags: review?(dvander) → review+
Comment on attachment 8871736 [details]
Bug 1367911 - Update APZCCallbackHelper to support WebRender.

https://reviewboard.mozilla.org/r/143218/#review147158

I obviously don't know the WR side of this but in terms of changes to the APZ code it looks fine.
Attachment #8871736 - Flags: review?(dvander) → review+
Comment on attachment 8871737 [details]
Bug 1367911 - Extract a GetLayersId() helper.

https://reviewboard.mozilla.org/r/143220/#review147160
Attachment #8871737 - Flags: review?(dvander) → review+
Pushed by kgupta@mozilla.com:
https://hg.mozilla.org/projects/graphics/rev/1d0c58e01f4d
Refactor the SetConfirmedTargetAPZC function to take a layers id. r=dvander
https://hg.mozilla.org/projects/graphics/rev/a7a313dc31ab
Update APZCCallbackHelper to support WebRender. r=dvander
https://hg.mozilla.org/projects/graphics/rev/577082fce7bf
Extract a GetLayersId() helper. r=dvander
I made an error in part 1, resulting in some test failures. CrossProcessCompositorBridge::SetConfirmedTargetAPZC passes |aLayersId| to CompositorBridgeParent, so the assertion I added to the top of CompositorBridgeParent::SetConfirmedTargetAPZC is incorrect. I'll remove the assertion.

The other alternatives are (a) having CrossProcessCompositorBridge pass the root compositor's layers id or (b) having the assertion allow layers ids where `sIndirectLayerTrees[aLayersId]->mParent == this`. I think the first option is probably a little misleading if we ever decide to use the aLayersId in the APZ code (right now it's unused) and the second option is probably not worth the effort.
Pushed by kgupta@mozilla.com:
https://hg.mozilla.org/projects/graphics/rev/4e09f53bcb57
Follow-up to remove invalid assertion. r=me
Depends on: 1370093
No longer depends on: 1370093
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: