Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge r249947 - [GTK] Crash closing web view while hardware accelerat…
…ion is enabled https://bugs.webkit.org/show_bug.cgi?id=200856 Reviewed by Michael Catanzaro. The crash happens when destroying the WaylandCompositor::Surface because the web view GL context is used to release the texture, but the GL context is no longer valid after web view unrealize. AcceleratedBackingStoreWayland should handle the web view unrealize to destroy the GL context. It will be created on demand again after the web view is realized. * UIProcess/API/gtk/WebKitWebViewBase.cpp: (webkitWebViewBaseRealize): Notify AcceleratedBackingStore. (webkitWebViewBaseUnrealize): Ditto. * UIProcess/gtk/AcceleratedBackingStore.h: (WebKit::AcceleratedBackingStore::realize): Added. (WebKit::AcceleratedBackingStore::unrealize): Added. * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp: (WebKit::AcceleratedBackingStoreWayland::realize): In case of using WaylandCompositor, call WaylandCompositor::bindWebPage() to bind the WebPageProxy to the Wayland surface. (WebKit::AcceleratedBackingStoreWayland::unrealize): Destroy GL resources and the GL context. (WebKit::AcceleratedBackingStoreWayland::tryEnsureGLContext): Do not try to create the GL context if the web view is not realized. (WebKit::AcceleratedBackingStoreWayland::displayBuffer): Remove the code to initialize the texture. (WebKit::AcceleratedBackingStoreWayland::paint): And add it here. * UIProcess/gtk/AcceleratedBackingStoreWayland.h: * UIProcess/gtk/WaylandCompositor.cpp: (WebKit::WaylandCompositor::Surface::setWebPage): Return early if given page is the current one already. (WebKit::WaylandCompositor::bindWebPage): Set the surface WebPageProxy. (WebKit::WaylandCompositor::unbindWebPage): Unset the surface WebPageProxy. * UIProcess/gtk/WaylandCompositor.h: * WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp: (WebKit::DrawingAreaCoordinatedGraphics::enterAcceleratedCompositingMode): When restoring a previous layer tree host, always call resumeRendering() to balance the suspendRendering() called in exitAcceleratedCompositingMode().
- Loading branch information
1 parent
1b6e871
commit 317b9c9
Showing
8 changed files
with
102 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters