[webkit-changes] [WebKit/WebKit] 3d2513: AcceleratedSurfaceDMABuf: properly handle modifier...

Žan Doberšek noreply at github.com
Tue Apr 4 08:05:42 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 3d2513728de85583a327016e600350eaf9c794ff
      https://github.com/WebKit/WebKit/commit/3d2513728de85583a327016e600350eaf9c794ff
  Author: Žan Doberšek <zdobersek at igalia.com>
  Date:   2023-04-04 (Tue, 04 Apr 2023)

  Changed paths:
    M Source/WebCore/platform/graphics/gbm/DMABufFormat.h
    M Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.cpp
    M Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.h
    M Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.messages.in
    M Source/WebKit/WebProcess/WebPage/gtk/AcceleratedSurfaceDMABuf.cpp

  Log Message:
  -----------
  AcceleratedSurfaceDMABuf: properly handle modifier values
https://bugs.webkit.org/show_bug.cgi?id=254937

Reviewed by Carlos Garcia Campos.

In AcceleratedSurfaceDMABuf, the backing object and EGLImage creation is packed
into a helper lambda. Buffer metadata is stored for the purposes of the
configuration message. Alongside everything else, the modifier value is now also
retrieved and passed in the EGL attributes array, as long as the EGL driver
indicates support for the relevant extension. The modifier value is also passed
in the configuration message.

In AcceleratedBackingStoreDMABuf, the newly-received modifier value is received
and passed over to the Texture class, where it's again used in the EGLImage
creation around the DMABuf object, as long as the EGL driver advertises the
extension as supported. A helper lambda is again used here to handle EGLImage
creation for a given DMABuf file descriptor.

DMABufFormat::Modifier::Invalid is added, the standard invalid-modifier value.
This is useful in place of including the whole drm_fourcc.h header.

* Source/WebCore/platform/graphics/gbm/DMABufFormat.h:
* Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.cpp:
(WebKit::AcceleratedBackingStoreDMABuf::Texture::Texture):
(WebKit::AcceleratedBackingStoreDMABuf::configure):
(WebKit::AcceleratedBackingStoreDMABuf::createSource):
* Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.h:
* Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.messages.in:
* Source/WebKit/WebProcess/WebPage/gtk/AcceleratedSurfaceDMABuf.cpp:
(WebKit::AcceleratedSurfaceDMABuf::clientResize):

Canonical link: https://commits.webkit.org/262576@main




More information about the webkit-changes mailing list