[webkit-changes] [WebKit/WebKit] 5a3c1c: [GTK][WPE] Prefer 8 bit DMA-BUF formats

Carlos Garcia Campos noreply at github.com
Fri Jan 12 01:41:04 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5a3c1c46999cad53a9bcc11b8e25b2ca2c0567fe
      https://github.com/WebKit/WebKit/commit/5a3c1c46999cad53a9bcc11b8e25b2ca2c0567fe
  Author: Carlos Garcia Campos <cgarcia at igalia.com>
  Date:   2024-01-12 (Fri, 12 Jan 2024)

  Changed paths:
    M Source/WebCore/platform/graphics/PlatformDisplay.cpp
    M Source/WebKit/WebProcess/WebPage/dmabuf/AcceleratedSurfaceDMABuf.cpp

  Log Message:
  -----------
  [GTK][WPE] Prefer 8 bit DMA-BUF formats
https://bugs.webkit.org/show_bug.cgi?id=267446

Reviewed by Adrian Perez de Castro.

I thought the formats returned by the compositor were sorted by
preference, but only the tranches are sorted by usage, so all formats
for the same usage has the same priority. Some, drivers are returning 10
bits formats first, but we should prefer 8 bits ones if supported.

* Source/WebCore/platform/graphics/PlatformDisplay.cpp:
(WebCore::PlatformDisplay::dmabufFormats): Sort supported formats and
iterate them to build the list checking if they are available.
* Source/WebKit/WebProcess/WebPage/dmabuf/AcceleratedSurfaceDMABuf.cpp:
(WebKit::AcceleratedSurfaceDMABuf::SwapChain::setupBufferFormat): Split
the format list by usage and iterate the supported list finding in every
usage list.

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




More information about the webkit-changes mailing list