[webkit-changes] [WebKit/WebKit] 863d0f: [WPE] Add explicit fence support for wayland
alexgcastro
noreply at github.com
Wed Jul 31 00:32:20 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 863d0f1f6ab1bcfdbc47b4a689af051c337576ad
https://github.com/WebKit/WebKit/commit/863d0f1f6ab1bcfdbc47b4a689af051c337576ad
Author: Alejandro G. Castro <alex at igalia.com>
Date: 2024-07-31 (Wed, 31 Jul 2024)
Changed paths:
M Source/WebKit/Shared/WebPageCreationParameters.h
M Source/WebKit/Shared/WebPageCreationParameters.serialization.in
M Source/WebKit/UIProcess/WebPageProxy.cpp
M Source/WebKit/UIProcess/WebPageProxy.h
M Source/WebKit/UIProcess/dmabuf/AcceleratedBackingStoreDMABuf.messages.in
M Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.cpp
M Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.h
M Source/WebKit/UIProcess/gtk/WebPageProxyGtk.cpp
M Source/WebKit/UIProcess/wpe/AcceleratedBackingStoreDMABuf.cpp
M Source/WebKit/UIProcess/wpe/AcceleratedBackingStoreDMABuf.h
M Source/WebKit/UIProcess/wpe/WebPageProxyWPE.cpp
M Source/WebKit/WPEPlatform/wpe/WPEBufferDMABuf.cpp
M Source/WebKit/WPEPlatform/wpe/WPEBufferDMABuf.h
M Source/WebKit/WPEPlatform/wpe/WPEDisplay.cpp
M Source/WebKit/WPEPlatform/wpe/WPEDisplay.h
M Source/WebKit/WPEPlatform/wpe/wayland/CMakeLists.txt
M Source/WebKit/WPEPlatform/wpe/wayland/WPEDisplayWayland.cpp
M Source/WebKit/WPEPlatform/wpe/wayland/WPEDisplayWaylandPrivate.h
M Source/WebKit/WPEPlatform/wpe/wayland/WPEToplevelWayland.cpp
M Source/WebKit/WPEPlatform/wpe/wayland/WPEToplevelWaylandPrivate.h
M Source/WebKit/WPEPlatform/wpe/wayland/WPEViewWayland.cpp
M Source/WebKit/WebProcess/WebPage/WebPage.cpp
M Source/WebKit/WebProcess/WebPage/WebPage.h
M Source/WebKit/WebProcess/WebPage/dmabuf/AcceleratedSurfaceDMABuf.cpp
M Source/WebKit/WebProcess/WebPage/dmabuf/AcceleratedSurfaceDMABuf.h
M Source/WebKit/WebProcess/WebPage/dmabuf/AcceleratedSurfaceDMABuf.messages.in
Log Message:
-----------
[WPE] Add explicit fence support for wayland
https://bugs.webkit.org/show_bug.cgi?id=276818
Reviewed by Miguel Gomez.
We are adding support to pass fence from the WebProcess to the wayland
server to avoid stopping the pipeline in the CPU. This is the initial
implementation, we are using the protocol
linux-explicit-synchronization-unstable-v1 and we plan to add support
for new protocols and DRM fences in the future.
The compositor generates a fence for the frame that is used to create a
synchronization point in the command queue and passed to the wayland
server. Also we receive the fence for the buffer usage from the wayland
server that we associate to the buffer and pused to the command queue
before using the buffer.
The patch adds the parameters to the messages in the IPC communication
between WebProcess and UIProces and methods to handle both fences.
Co-authored-by: Carlos Garcia Campos <cgarcia at igalia.com>
* Source/WebKit/Shared/WebPageCreationParameters.h:
* Source/WebKit/Shared/WebPageCreationParameters.serialization.in:
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::creationParameters):
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/dmabuf/AcceleratedBackingStoreDMABuf.messages.in:
* Source/WebKit/UIProcess/gtk/WebPageProxyGtk.cpp:
(WebKit::WebPageProxy::useExplicitSync const):
* Source/WebKit/UIProcess/wpe/AcceleratedBackingStoreDMABuf.cpp:
(WebKit::AcceleratedBackingStoreDMABuf::frame):
(WebKit::AcceleratedBackingStoreDMABuf::bufferReleased):
* Source/WebKit/UIProcess/wpe/AcceleratedBackingStoreDMABuf.h:
* Source/WebKit/UIProcess/wpe/WebPageProxyWPE.cpp:
(WebKit::WebPageProxy::useExplicitSync const):
* Source/WebKit/WPEPlatform/wpe/WPEBufferDMABuf.cpp:
(wpe_buffer_dma_buf_set_rendering_fence):
(wpe_buffer_dma_buf_get_rendering_fence):
(wpe_buffer_dma_buf_take_rendering_fence):
(wpe_buffer_dma_buf_set_release_fence):
(wpe_buffer_dma_buf_get_release_fence):
(wpe_buffer_dma_buf_take_release_fence):
* Source/WebKit/WPEPlatform/wpe/WPEBufferDMABuf.h:
* Source/WebKit/WPEPlatform/wpe/WPEDisplay.cpp:
(wpe_display_use_explicit_sync):
* Source/WebKit/WPEPlatform/wpe/WPEDisplay.h:
* Source/WebKit/WPEPlatform/wpe/wayland/CMakeLists.txt:
* Source/WebKit/WPEPlatform/wpe/wayland/WPEDisplayWayland.cpp:
(wpeDisplayWaylandDispose):
(wpeDisplayWaylandUseExplicitSync):
(wpeDisplayWaylandGetLinuxExplicitSync):
(wpe_display_wayland_class_init):
* Source/WebKit/WPEPlatform/wpe/wayland/WPEDisplayWaylandPrivate.h:
* Source/WebKit/WPEPlatform/wpe/wayland/WPEToplevelWayland.cpp:
(wpeToplevelWaylandConstructed):
(wpeToplevelWaylandDispose):
(wpeToplevelWaylandHasSyncObject):
(wpeToplevelWaylandGetSyncListener):
* Source/WebKit/WPEPlatform/wpe/wayland/WPEToplevelWaylandPrivate.h:
* Source/WebKit/WPEPlatform/wpe/wayland/WPEViewWayland.cpp:
(DMABufBuffer::DMABufBuffer):
(DMABufBuffer::~DMABufBuffer):
(dmaBufBufferDestroy):
(createWaylandBufferFromDMABuf):
(SharedMemoryBuffer::SharedMemoryBuffer):
(sharedMemoryBufferCreate):
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
* Source/WebKit/WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::useExplicitSync const):
* Source/WebKit/WebProcess/WebPage/dmabuf/AcceleratedSurfaceDMABuf.cpp:
(WebKit::AcceleratedSurfaceDMABuf::AcceleratedSurfaceDMABuf):
(WebKit::AcceleratedSurfaceDMABuf::RenderTarget::setReleaseFence):
(WebKit::AcceleratedSurfaceDMABuf::SwapChain::releaseTarget):
(WebKit::AcceleratedSurfaceDMABuf::willRenderFrame):
(WebKit::AcceleratedSurfaceDMABuf::didRenderFrame):
(WebKit::AcceleratedSurfaceDMABuf::releaseBuffer):
* Source/WebKit/WebProcess/WebPage/dmabuf/AcceleratedSurfaceDMABuf.h:
* Source/WebKit/WebProcess/WebPage/dmabuf/AcceleratedSurfaceDMABuf.messages.in:
Canonical link: https://commits.webkit.org/281640@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list