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

  Changed paths:
    M Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp
    M Source/WebKit/UIProcess/dmabuf/AcceleratedBackingStoreDMABuf.messages.in
    M Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.cpp
    M Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.h
    M Source/WebKit/UIProcess/wpe/AcceleratedBackingStoreDMABuf.cpp
    M Source/WebKit/UIProcess/wpe/AcceleratedBackingStoreDMABuf.h
    M Source/WebKit/WebProcess/WebPage/AcceleratedSurface.h
    M Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp
    M Source/WebKit/WebProcess/WebPage/dmabuf/AcceleratedSurfaceDMABuf.cpp
    M Source/WebKit/WebProcess/WebPage/dmabuf/AcceleratedSurfaceDMABuf.h
    M Source/WebKit/WebProcess/WebPage/libwpe/AcceleratedSurfaceLibWPE.cpp
    M Source/WebKit/WebProcess/WebPage/libwpe/AcceleratedSurfaceLibWPE.h

  Log Message:
  -----------
  [GTK][WPE] Do not pass invalid damage areas to the UI process
https://bugs.webkit.org/show_bug.cgi?id=276480

Reviewed by Alejandro G. Castro.

This is not a problem under wayland because the compositor always
handles the case of the area being empty or bigger than the buffer. In
DRM the request fails with invalid argument if the area passed is not
valid. We can make sure the damage areas we generate in the web process
are always valid. We should also avoid passing a damage region
containing the whole buffer.

This patch clips the damage rectangles to make sure they are not bigger
than the buffer size. It also handles the case of empty regions, we
don't really need to use an optional because an empty damage region
means damaging the whole buffer.

* Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::recordDamage):
* Source/WebKit/UIProcess/dmabuf/AcceleratedBackingStoreDMABuf.messages.in:
* Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.cpp:
(WebKit::AcceleratedBackingStoreDMABuf::BufferDMABuf::didUpdateContents):
(WebKit::AcceleratedBackingStoreDMABuf::BufferEGLImage::didUpdateContents):
(WebKit::AcceleratedBackingStoreDMABuf::BufferGBM::didUpdateContents):
(WebKit::AcceleratedBackingStoreDMABuf::BufferSHM::didUpdateContents):
(WebKit::AcceleratedBackingStoreDMABuf::frame):
(WebKit::AcceleratedBackingStoreDMABuf::update):
(WebKit::AcceleratedBackingStoreDMABuf::prepareForRendering):
* Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.h:
* Source/WebKit/UIProcess/wpe/AcceleratedBackingStoreDMABuf.cpp:
(WebKit::AcceleratedBackingStoreDMABuf::frame):
* Source/WebKit/UIProcess/wpe/AcceleratedBackingStoreDMABuf.h:
* Source/WebKit/WebProcess/WebPage/AcceleratedSurface.h:
(WebKit::AcceleratedSurface::didRenderFrame):
(WebKit::AcceleratedSurface::size const):
* Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp:
(WebKit::LayerTreeHost::didRenderFrame):
* Source/WebKit/WebProcess/WebPage/dmabuf/AcceleratedSurfaceDMABuf.cpp:
(WebKit::AcceleratedSurfaceDMABuf::didRenderFrame):
* Source/WebKit/WebProcess/WebPage/dmabuf/AcceleratedSurfaceDMABuf.h:
* Source/WebKit/WebProcess/WebPage/libwpe/AcceleratedSurfaceLibWPE.cpp:
(WebKit::AcceleratedSurfaceLibWPE::didRenderFrame):
* Source/WebKit/WebProcess/WebPage/libwpe/AcceleratedSurfaceLibWPE.h:

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to