Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 441a3adb238e19682d95df52241bf97e9971ecba
      
https://github.com/WebKit/WebKit/commit/441a3adb238e19682d95df52241bf97e9971ecba
  Author: Carlos Garcia Campos <[email protected]>
  Date:   2026-07-14 (Tue, 14 Jul 2026)

  Changed paths:
    M 
Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/AcceleratedSurface.cpp
    M Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/AcceleratedSurface.h
    M 
Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/ThreadedCompositor.cpp

  Log Message:
  -----------
  [GTK][WPE][Skia] Render the compositor output into a renderbuffer instead of 
a texture
https://bugs.webkit.org/show_bug.cgi?id=319083

Reviewed by Alejandro G. Castro.

The Skia compositor imported the shared scanout dma-buf as a
GL_TEXTURE_2D and wrapped it in a Skia texture surface
(SkSurfaces::WrapBackendTexture), so the frame was rendered into a
sampleable texture. The web process never samples this buffer. Import it
as a GL renderbuffer and render into it with a wrapped backend render
target (SkSurfaces::WrapBackendRenderTarget) instead. This matches the
TextureMapper compositor and keeps the scanout buffer a pure render
target, so drivers might optimize for the fact that it is not sampleable.

RenderTargetShareableBuffer owns the framebuffer and its depth and
stencil buffer. They are now created always in the constructor when the
surface is using GL. The skia surface is now created in initializeColorBuffer()
that receives an optional EGLImage so that it can be shared with SHM
targets. It leaves the Skia surface unset when the framebuffer is not
complete, so a broken buffer is skipped instead of rendered into.
createSkiaSurfaceForTexture() has been replaced by 
createSkiaSurfaceForFramebuffer().

* Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/AcceleratedSurface.cpp:
(WebKit::AcceleratedSurface::RenderTarget::RenderTarget):
(WebKit::AcceleratedSurface::RenderTarget::createSkiaSurfaceForFramebuffer):
(WebKit::AcceleratedSurface::RenderTargetShareableBuffer::RenderTargetShareableBuffer):
(WebKit::AcceleratedSurface::RenderTargetShareableBuffer::~RenderTargetShareableBuffer):
(WebKit::AcceleratedSurface::RenderTargetShareableBuffer::initializeColorBuffer):
(WebKit::AcceleratedSurface::RenderTargetEGLImage::RenderTargetEGLImage):
(WebKit::AcceleratedSurface::RenderTargetEGLImage::~RenderTargetEGLImage):
(WebKit::AcceleratedSurface::RenderTargetSHMImage::RenderTargetSHMImage):
(WebKit::AcceleratedSurface::RenderTargetTexture::RenderTargetTexture):
(WebKit::AcceleratedSurface::RenderTargetWPEBackend::RenderTargetWPEBackend):
(WebKit::AcceleratedSurface::RenderTargetWPEBackend::willRenderFrame):
(WebKit::AcceleratedSurface::RenderTarget::createSkiaSurfaceForTexture): 
Deleted.
(WebKit::AcceleratedSurface::RenderTargetEGLImage::initializeColorBuffer): 
Deleted.
(WebKit::AcceleratedSurface::RenderTargetSHMImage::~RenderTargetSHMImage): 
Deleted.
* Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/AcceleratedSurface.h:

Co-authored-by: Nikolas Zimmermann <[email protected]>
* Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/ThreadedCompositor.cpp:
(WebKit::m_renderTimer):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to