[webkit-changes] [WebKit/WebKit] 01716a: [WPE] WPE Platform: do not release buffers when re...

Carlos Garcia Campos noreply at github.com
Mon Mar 11 08:29:31 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 01716ada465537d722308dd31ec31171ffeffe86
      https://github.com/WebKit/WebKit/commit/01716ada465537d722308dd31ec31171ffeffe86
  Author: Carlos Garcia Campos <cgarcia at igalia.com>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M Source/WebKit/UIProcess/wpe/AcceleratedBackingStoreDMABuf.cpp
    M Source/WebKit/UIProcess/wpe/AcceleratedBackingStoreDMABuf.h
    M Source/WebKit/WPEPlatform/wpe/WPEBuffer.cpp
    M Source/WebKit/WPEPlatform/wpe/WPEBuffer.h
    M Source/WebKit/WPEPlatform/wpe/WPEBufferDMABuf.cpp
    M Source/WebKit/WPEPlatform/wpe/WPEBufferDMABuf.h
    M Source/WebKit/WPEPlatform/wpe/WPEBufferSHM.cpp
    M Source/WebKit/WPEPlatform/wpe/WPEBufferSHM.h
    M Source/WebKit/WPEPlatform/wpe/WPEView.cpp
    M Source/WebKit/WPEPlatform/wpe/WPEView.h
    M Source/WebKit/WPEPlatform/wpe/drm/WPEViewDRM.cpp
    M Source/WebKit/WPEPlatform/wpe/headless/WPEViewHeadless.cpp
    M Source/WebKit/WPEPlatform/wpe/wayland/WPEViewWayland.cpp

  Log Message:
  -----------
  [WPE] WPE Platform: do not release buffers when rendered
https://bugs.webkit.org/show_bug.cgi?id=270693

Reviewed by Alejandro G. Castro.

The buffers can be rendered again, so we need to keep them locked until
a new frame is ready to be rendered. This patch adds
WPEView::buffer-released in addition to the existing
WPEView::buffer-rendered to notify that the buffer is no longer used and
can be destroyed or reused. This patch also changes the WPEBuffer API to
receive a WPEView in constructor instead of WPEDisplay, since buffers
are actually attached to a specific WPEView, because we need to easily
get the WPEView from the wayland buffer release callback.

* Source/WebKit/UIProcess/wpe/AcceleratedBackingStoreDMABuf.cpp:
(WebKit::AcceleratedBackingStoreDMABuf::AcceleratedBackingStoreDMABuf):
(WebKit::AcceleratedBackingStoreDMABuf::updateSurfaceID):
(WebKit::AcceleratedBackingStoreDMABuf::didCreateBuffer):
(WebKit::AcceleratedBackingStoreDMABuf::didCreateBufferSHM):
(WebKit::AcceleratedBackingStoreDMABuf::bufferRendered):
(WebKit::AcceleratedBackingStoreDMABuf::bufferReleased):
* Source/WebKit/UIProcess/wpe/AcceleratedBackingStoreDMABuf.h:
* Source/WebKit/WPEPlatform/wpe/WPEBuffer.cpp:
(wpeBufferGetProperty):
(wpe_buffer_class_init):
(wpe_buffer_get_view):
(wpe_buffer_get_display): Deleted.
* Source/WebKit/WPEPlatform/wpe/WPEBuffer.h:
* Source/WebKit/WPEPlatform/wpe/WPEBufferDMABuf.cpp:
(wpeBufferDMABufDispose):
(wpeBufferDMABufImportToEGLImage):
(wpeBufferDMABufTryEnsureGBMDevice):
(wpe_buffer_dma_buf_new):
* Source/WebKit/WPEPlatform/wpe/WPEBufferDMABuf.h:
* Source/WebKit/WPEPlatform/wpe/WPEBufferSHM.cpp:
(wpe_buffer_shm_new):
* Source/WebKit/WPEPlatform/wpe/WPEBufferSHM.h:
* Source/WebKit/WPEPlatform/wpe/WPEView.cpp:
(wpe_view_class_init):
(wpe_view_buffer_released):
* Source/WebKit/WPEPlatform/wpe/WPEView.h:
* Source/WebKit/WPEPlatform/wpe/drm/WPEViewDRM.cpp:
(drmBufferCreateDMABuf):
(drmBufferCreate):
(wpeViewDRMRequestUpdate):
(wpeViewDRMRenderBuffer):
(wpeViewDRMDidPageFlip):
* Source/WebKit/WPEPlatform/wpe/headless/WPEViewHeadless.cpp:
(wpeViewHeadlessRenderBuffer):
* Source/WebKit/WPEPlatform/wpe/wayland/WPEViewWayland.cpp:
(createWaylandBufferFromDMABuf):
(createWaylandBufferSHM):
(createWaylandBuffer):
(createWaylandBufferFromEGLImage): Deleted.

Canonical link: https://commits.webkit.org/275903@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