Pinch zooming doesn't work after GPU process crash
Categories
(Core :: Panning and Zooming, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox97 | --- | fixed |
People
(Reporter: jnicol, Assigned: jnicol)
References
Details
Attachments
(3 files)
This is especially noticeable now that I have been testing the GPU process on Android, as pinch zooming is very common. But it also affects windows, and linux if you force-enable the GPU process.
STR:
- Open any page, eg mozilla.org
- Pinch zooming works as expected
- Trigger a GPU process crash
- Attempt to pinch zoom, but it doesn't work.
With some logging I have determined that AsyncPanZoomController::UpdateZoomConstraints()
does not get called after the GPU process crash, meaning mZoomConstraints.mAllowZoom
remains false, and as a result pinch gestures are ignored by the pan zoom controller.
UpdateZoomConstraints appears to get called in the first place (prior to GPU process crash) due to a first paint event in ZoomConstraintsClient. Perhaps we need to find a way to trigger that event from BrowserChild::ReinitRendering(), or something like that.
Comment 1•3 years ago
|
||
There's a patch in https://phabricator.services.mozilla.com/D113608 for refreshing the zoom constraints when a tab is dragged to a new tab, probably doesn't fix this, but a similar type of problem.
Updated•3 years ago
|
Assignee | ||
Comment 2•3 years ago
|
||
Following a GPU process restart ZoomConstraints do not currently get
set for the newly recreated APZCTreeManagers, meaning it is no longer
possible to asynchronously zoom pages.
To solve this, we make ZoomConstraintsClient observe a new
"compositor-reinitialized" topic. We send this notification in
GPUProcessManager::HandleProcessLost() to notify
ZoomConstraintsClients for parent process documents, and in
ContentChild::RecvReinitRendering() for documents in their respective
content processes. This must be performed after the compositor has
been reinitialized so that the APZCTreeManagerChild is able to send
the constraints to the APZCTreeManagerParent in the compositor
process.
Assignee | ||
Comment 3•3 years ago
|
||
Add KillGPUProcessForTests, which kills the GPU process without
generating a crash dump (unlike the existing CrashGPUProcessForTests).
Additionally add EnsureGPUProcessReadyForTests, which returns a
promise that resolves to true when the GPU process is enabled and
ready, and false if it is disabled. If called while the GPU process is
being (re)started, it will not resolve until it has finished launching
(or was disabled due to error).
Finally, make GPUProcessHost::IsConnected check whether the process
handle is valid. This ensures it returns false immediately following a
call to KillProcess but prior to the GPUChild being destroyed. This
means tests can call EnsureGPUProcessReadyForTests immediately after
KillGPUProcessForTests or CrashGPUProcessForTests, and it will
reliably wait for the new process to launch, as intended.
Depends on D135207
Assignee | ||
Comment 4•3 years ago
|
||
Depends on D135328
Comment 6•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/441e0b2582cc
https://hg.mozilla.org/mozilla-central/rev/6bdd63376651
https://hg.mozilla.org/mozilla-central/rev/9de7d3c3aa74
Description
•