APZInputBridgeChild for Android GPU process needs to be callable from UI thread.
Categories
(GeckoView Graveyard :: Sandboxing, defect, P5)
Tracking
(firefox54 wontfix, firefox96 fixed)
People
(Reporter: rbarker, Assigned: jnicol)
References
Details
Attachments
(1 file)
Reporter | ||
Updated•8 years ago
|
Comment 1•7 years ago
|
||
Updated•6 years ago
|
Reporter | ||
Updated•5 years ago
|
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 2•3 years ago
|
||
On Android the APZ controller thread is the android UI thread, rather
than the Gecko main thread as on other platforms. There some places
where the main thread requires to call IAPZCTreeManager functions that
must run on the controller thread. Currently we use the function
DispatchToControllerThread() prior to calling various IAPZCTreeManager
APIs to achieve this.
This works just fine for now, as there is no GPU process on
Android. However, once we do add a GPU process we will encounter
issues:
Firstly, there will now be a cross-process APZInputBridge rather than
using an in-process APZCTreeManager. The PAPZInputBridge protocol is
managed by PGPU, and therefore must run on the main thread in the
parent process. The input we require to send over the bridge, however,
originates from the UI thread.
To solve this we can convert PAPZInputBridge to a top-level protocol,
and bind it to the UI thread on Android. We can then send input
directly from the UI thread without issues.
Secondly, the PAPZCTreeManager protocol must also run from the main
thread in the parent process, as it is managed by
PCompositorBridge. Unlike PAPZInputBridge we cannot convert
PAPZCTreeManager in to a top level protocol, as it relies on the
ordering guarantees with PCompositorBridge.
We must therefore ensure that we only dispatch IAPZCTreeManager calls
to the controller thread when using an in-process
APZCTreeManager. Out-of-process calls, on the other hand, must be
dispatched to the main thread where we can send IPDL commands from. To
do this, we move the dispatch logic away from the callsites of
IAPZCTreeManager APIs, and in to the APZCTreeManager and
APZCTreeManagerChild implementations themselves.
Comment 4•3 years ago
|
||
bugherder |
Updated•3 years ago
|
Comment 5•3 years ago
|
||
Moving GPU process bugs to the new GeckoView::Sandboxing component.
Updated•8 months ago
|
Description
•