[webkit-changes] [WebKit/WebKit] d3a983: [GTK] Use the buffer format preferred by the drive...

Carlos Garcia Campos noreply at github.com
Sun Oct 22 05:37:46 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d3a9830bb67830d77bfbb785df77020fc104aef6
      https://github.com/WebKit/WebKit/commit/d3a9830bb67830d77bfbb785df77020fc104aef6
  Author: Carlos Garcia Campos <cgarcia at igalia.com>
  Date:   2023-10-22 (Sun, 22 Oct 2023)

  Changed paths:
    M Source/WebCore/platform/graphics/PlatformDisplay.cpp
    M Source/WebCore/platform/graphics/PlatformDisplay.h
    M Source/WebKit/PlatformGTK.cmake
    M Source/WebKit/Shared/WebPageCreationParameters.h
    M Source/WebKit/Shared/WebPageCreationParameters.serialization.in
    A Source/WebKit/Shared/glib/DMABufRendererBufferFormat.h
    A Source/WebKit/Shared/glib/DMABufRendererBufferFormat.serialization.in
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    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/WebPage.cpp
    M Source/WebKit/WebProcess/WebPage/WebPage.h
    M Source/WebKit/WebProcess/WebPage/gtk/AcceleratedSurfaceDMABuf.cpp
    M Source/WebKit/WebProcess/WebPage/gtk/AcceleratedSurfaceDMABuf.h
    M Source/cmake/OptionsGTK.cmake

  Log Message:
  -----------
  [GTK] Use the buffer format preferred by the driver in DMA-BUF renderer
https://bugs.webkit.org/show_bug.cgi?id=263309

Reviewed by Alejandro G. Castro.

We currently use ARGB8888 unconditionally, assuming it will be supported
by all drivers. We should query the driver for the list of supported
formats and modifiers and create the GBM buffer with modifiers to make
sure the optimal format and modifier is used. Now it's possible that the
selected format and modifier results in a multiplane buffer, so this
patch also implements the support for importing and exporting simple
multiplane DMA-BUF buffers.

* Source/WebCore/platform/graphics/PlatformDisplay.cpp:
(WebCore::PlatformDisplay::gbmDevice):
(WebCore::PlatformDisplay::dmabufFormats):
* Source/WebCore/platform/graphics/PlatformDisplay.h:
* Source/WebKit/PlatformGTK.cmake:
* Source/WebKit/Shared/WebPageCreationParameters.h:
* Source/WebKit/Shared/WebPageCreationParameters.serialization.in:
* Source/WebKit/Shared/glib/DMABufRendererBufferFormat.h: Added.
* Source/WebKit/Shared/glib/DMABufRendererBufferFormat.serialization.in: Added.
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::creationParameters):
* Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.cpp:
(WebKit::AcceleratedBackingStoreDMABuf::preferredBufferFormats):
(WebKit::AcceleratedBackingStoreDMABuf::BufferEGLImage::create):
(WebKit::AcceleratedBackingStoreDMABuf::BufferEGLImage::BufferEGLImage):
(WebKit::AcceleratedBackingStoreDMABuf::BufferGBM::create):
(WebKit::AcceleratedBackingStoreDMABuf::BufferGBM::BufferGBM):
(WebKit::AcceleratedBackingStoreDMABuf::BufferGBM::surface const):
(WebKit::AcceleratedBackingStoreDMABuf::didCreateBuffer):
* Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.h:
* Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.messages.in:
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
* Source/WebKit/WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::preferredBufferFormats const):
* Source/WebKit/WebProcess/WebPage/gtk/AcceleratedSurfaceDMABuf.cpp:
(WebKit::AcceleratedSurfaceDMABuf::AcceleratedSurfaceDMABuf):
(WebKit::AcceleratedSurfaceDMABuf::RenderTargetEGLImage::create):
(WebKit::AcceleratedSurfaceDMABuf::RenderTargetEGLImage::RenderTargetEGLImage):
(WebKit::AcceleratedSurfaceDMABuf::RenderTargetTexture::create):
(WebKit::AcceleratedSurfaceDMABuf::RenderTargetTexture::RenderTargetTexture):
(WebKit::AcceleratedSurfaceDMABuf::SwapChain::setupBufferFormat):
(WebKit::AcceleratedSurfaceDMABuf::SwapChain::createTarget const):
* Source/WebKit/WebProcess/WebPage/gtk/AcceleratedSurfaceDMABuf.h:
* Source/cmake/OptionsGTK.cmake:

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




More information about the webkit-changes mailing list