WebKit Bugzilla
Attachment 370938 Details for
Bug 198372
: [GTK] WPERenderer: ensure we complete the last frame when leaving AC mode
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
wkgtk-wpe-pending-image.diff (text/plain), 4.01 KB, created by
Carlos Garcia Campos
on 2019-05-30 05:45:46 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Carlos Garcia Campos
Created:
2019-05-30 05:45:46 PDT
Size:
4.01 KB
patch
obsolete
>diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index a75c43ba7ed..ad856a97139 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,21 @@ >+2019-05-30 Carlos Garcia Campos <cgarcia@igalia.com> >+ >+ [GTK] WPERenderer: ensure we complete the last frame when leaving AC mode >+ https://bugs.webkit.org/show_bug.cgi?id=198372 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ It can happen that we leave AC mode after a new image is received from the web process but before it's >+ committed. It can also happen that we receive a new image from the web process right after we have left AC >+ mode. In both cases we need to complete the frame to ensure we don't leave the wayland compositor waiting >+ forever for a frame to be completed. >+ >+ * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp: >+ (WebKit::AcceleratedBackingStoreWayland::update): Complete any pending image when a new surface is used. >+ (WebKit::AcceleratedBackingStoreWayland::displayBuffer): Complete the given image and return early if we already >+ left AC mode. >+ * UIProcess/gtk/AcceleratedBackingStoreWayland.h: >+ > 2019-05-30 Carlos Garcia Campos <cgarcia@igalia.com> > > [CoordinatedGraphics] WPERenderer: do not release the host file descritor when initializing the render target >diff --git a/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreWayland.cpp b/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreWayland.cpp >index a242d70de60..57f67951a4c 100644 >--- a/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreWayland.cpp >+++ b/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreWayland.cpp >@@ -28,6 +28,7 @@ > > #if PLATFORM(WAYLAND) && USE(EGL) > >+#include "LayerTreeContext.h" > #include "WebPageProxy.h" > // These includes need to be in this order because wayland-egl.h defines WL_EGL_PLATFORM > // and eglplatform.h, included by egl.h, checks that to decide whether it's Wayland platform. >@@ -181,6 +182,19 @@ bool AcceleratedBackingStoreWayland::makeContextCurrent() > } > > #if USE(WPE_RENDERER) >+void AcceleratedBackingStoreWayland::update(const LayerTreeContext& context) >+{ >+ if (m_surfaceID == context.contextID) >+ return; >+ >+ m_surfaceID = context.contextID; >+ if (m_pendingImage) { >+ wpe_view_backend_exportable_fdo_dispatch_frame_complete(m_exportable); >+ wpe_view_backend_exportable_fdo_egl_dispatch_release_exported_image(m_exportable, m_pendingImage); >+ m_pendingImage = nullptr; >+ } >+} >+ > int AcceleratedBackingStoreWayland::renderHostFileDescriptor() > { > return wpe_view_backend_get_renderer_host_fd(wpe_view_backend_exportable_fdo_get_view_backend(m_exportable)); >@@ -188,6 +202,12 @@ int AcceleratedBackingStoreWayland::renderHostFileDescriptor() > > void AcceleratedBackingStoreWayland::displayBuffer(struct wpe_fdo_egl_exported_image* image) > { >+ if (!m_surfaceID) { >+ wpe_view_backend_exportable_fdo_dispatch_frame_complete(m_exportable); >+ wpe_view_backend_exportable_fdo_egl_dispatch_release_exported_image(m_exportable, image); >+ return; >+ } >+ > if (!m_viewTexture) { > if (!makeContextCurrent()) > return; >diff --git a/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreWayland.h b/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreWayland.h >index b44349f3423..b697d683de0 100644 >--- a/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreWayland.h >+++ b/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreWayland.h >@@ -66,6 +66,7 @@ private: > bool paint(cairo_t*, const WebCore::IntRect&) override; > bool makeContextCurrent() override; > #if USE(WPE_RENDERER) >+ void update(const LayerTreeContext&) override; > int renderHostFileDescriptor() override; > #endif > >@@ -78,6 +79,7 @@ private: > > #if USE(WPE_RENDERER) > struct wpe_view_backend_exportable_fdo* m_exportable { nullptr }; >+ uint64_t m_surfaceID { 0 }; > unsigned m_viewTexture { 0 }; > struct wpe_fdo_egl_exported_image* m_committedImage { nullptr }; > struct wpe_fdo_egl_exported_image* m_pendingImage { nullptr };
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
mcatanzaro
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198372
: 370938