Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f84fa6a88b80c399fa10ed4b061021cd6c438ab3
      
https://github.com/WebKit/WebKit/commit/f84fa6a88b80c399fa10ed4b061021cd6c438ab3
  Author: Carlos Garcia Campos <cgar...@igalia.com>
  Date:   2025-03-20 (Thu, 20 Mar 2025)

  Changed paths:
    M LayoutTests/platform/glib/damage/accelerated-canvas-2d-fillRect.html
    M LayoutTests/platform/glib/damage/animations-blur.html
    M LayoutTests/platform/glib/damage/basic-propagation-001.html
    M LayoutTests/platform/glib/damage/basic-propagation-002.html
    M LayoutTests/platform/glib/damage/canvas-webgl.html
    M LayoutTests/platform/glib/damage/common.js
    M LayoutTests/platform/glib/damage/image-as-layer-src-change.html
    M LayoutTests/platform/glib/damage/image-src-change.html
    M LayoutTests/platform/glib/damage/layer-backdrop-filter.html
    M LayoutTests/platform/glib/damage/layer-color-change.html
    M LayoutTests/platform/glib/damage/layer-downsize-with-movement.html
    M LayoutTests/platform/glib/damage/layer-downsize.html
    M LayoutTests/platform/glib/damage/layer-in-layer-movement.html
    M LayoutTests/platform/glib/damage/layer-movement.html
    M LayoutTests/platform/glib/damage/layer-opacity-change.html
    M LayoutTests/platform/glib/damage/layer-overlaps-with-opacity.html
    M LayoutTests/platform/glib/damage/layer-resize.html
    M LayoutTests/platform/glib/damage/layer-text-change.html
    M LayoutTests/platform/glib/damage/layer-upsize.html
    M LayoutTests/platform/glib/damage/layer-visibility-change.html
    M LayoutTests/platform/glib/damage/non-accelerated-canvas-2d-arc.html
    M LayoutTests/platform/glib/damage/non-accelerated-canvas-2d-downsizing.html
    M 
LayoutTests/platform/glib/damage/non-accelerated-canvas-2d-fillRect-w-offset.html
    M LayoutTests/platform/glib/damage/non-accelerated-canvas-2d-fillRect.html
    M LayoutTests/platform/glib/damage/non-accelerated-canvas-2d-new-canvas.html
    M LayoutTests/platform/glib/damage/non-accelerated-canvas-2d-path.html
    M 
LayoutTests/platform/glib/damage/non-accelerated-canvas-2d-putImageData.html
    M LayoutTests/platform/glib/damage/non-accelerated-canvas-2d-resizing.html
    M LayoutTests/platform/glib/damage/non-accelerated-canvas-2d-text.html
    M LayoutTests/platform/glib/damage/non-accelerated-canvas-2d-upsizing.html
    M LayoutTests/platform/glib/damage/scrolling-container-001.html
    M LayoutTests/platform/glib/damage/scrolling-container-002.html
    M LayoutTests/platform/glib/damage/scrolling-container-003.html
    M LayoutTests/platform/glib/damage/scrolling-container-004.html
    M LayoutTests/platform/glib/damage/scrolling-fullscreen-001.html
    M LayoutTests/platform/glib/damage/scrolling-fullscreen-002.html
    M LayoutTests/platform/glib/damage/scrolling-fullscreen-003.html
    M LayoutTests/platform/glib/damage/storage-and-simplification-algorithm.html
    M LayoutTests/platform/glib/damage/transform-2d-rotate.html
    M LayoutTests/platform/glib/damage/transform-2d-scale.html
    M LayoutTests/platform/glib/damage/transform-2d-skew.html
    M LayoutTests/platform/glib/damage/transform-2d-translate.html
    M LayoutTests/platform/glib/damage/transform-3d-dynamic-addition.html
    M LayoutTests/platform/glib/damage/transform-3d-dynamic-re-addition.html
    M LayoutTests/platform/glib/damage/transform-3d-dynamic-removal.html
    M LayoutTests/platform/glib/damage/transform-3d-rotate-1-axis.html
    M 
LayoutTests/platform/glib/damage/transform-3d-rotate-3-axes-content-update.html
    M LayoutTests/platform/glib/damage/transform-3d-rotate-3-axes.html
    M LayoutTests/platform/glib/damage/transform-3d-rotate-in-still-rotate.html
    M LayoutTests/platform/glib/damage/transform-3d-scale.html
    M 
LayoutTests/platform/glib/damage/transform-3d-translate-w-perspective-content-update.html
    M LayoutTests/platform/glib/damage/transform-3d-translate-w-perspective.html
    M LayoutTests/platform/glib/damage/transform-3d-translate.html
    M LayoutTests/platform/glib/damage/video.html
    M Source/WebCore/platform/graphics/Damage.h
    M Source/WebCore/platform/graphics/texmap/TextureMapper.h
    M Source/WebCore/platform/graphics/texmap/TextureMapperDamageVisualizer.cpp
    M Source/WebCore/platform/graphics/texmap/TextureMapperDamageVisualizer.h
    M Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp
    M Source/WebCore/platform/graphics/texmap/TextureMapperLayer.h
    M 
Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedBackingStore.cpp
    M 
Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayer.cpp
    M Source/WebCore/testing/Internals.cpp
    M Source/WebCore/testing/Internals.h
    M Source/WebCore/testing/Internals.idl
    M Source/WebKit/WebProcess/WebPage/AcceleratedSurface.h
    M 
Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/ThreadedCompositor.cpp
    M Source/WebKit/WebProcess/WebPage/dmabuf/AcceleratedSurfaceDMABuf.cpp
    M Source/WebKit/WebProcess/WebPage/dmabuf/AcceleratedSurfaceDMABuf.h
    M Tools/TestWebKitAPI/Tests/WebCore/glib/Damage.cpp

  Log Message:
  -----------
  [GTK][WPE] Remove invalid flag from Damage
https://bugs.webkit.org/show_bug.cgi?id=290098

Reviewed by Alejandro G. Castro.

The invalid flag is very confusing, it's not clear the difference
between empty and invalid Damage, and it's used with different meanings
in different places. We can just use std::optional which always means no
damage, so that the way we handle no damage depends on every case.
This patch also tries to avoid copying Damage whenever possible and
removes the method to get a region, since that's only used by the
FrameDamageHistory and it's an implementation detail.

* LayoutTests/platform/glib/damage/accelerated-canvas-2d-fillRect.html:
* LayoutTests/platform/glib/damage/animations-blur.html:
* LayoutTests/platform/glib/damage/basic-propagation-001.html:
* LayoutTests/platform/glib/damage/basic-propagation-002.html:
* LayoutTests/platform/glib/damage/canvas-webgl.html:
* LayoutTests/platform/glib/damage/common.js:
* LayoutTests/platform/glib/damage/image-as-layer-src-change.html:
* LayoutTests/platform/glib/damage/image-src-change.html:
* LayoutTests/platform/glib/damage/layer-backdrop-filter.html:
* LayoutTests/platform/glib/damage/layer-color-change.html:
* LayoutTests/platform/glib/damage/layer-downsize-with-movement.html:
* LayoutTests/platform/glib/damage/layer-downsize.html:
* LayoutTests/platform/glib/damage/layer-in-layer-movement.html:
* LayoutTests/platform/glib/damage/layer-movement.html:
* LayoutTests/platform/glib/damage/layer-opacity-change.html:
* LayoutTests/platform/glib/damage/layer-overlaps-with-opacity.html:
* LayoutTests/platform/glib/damage/layer-resize.html:
* LayoutTests/platform/glib/damage/layer-text-change.html:
* LayoutTests/platform/glib/damage/layer-upsize.html:
* LayoutTests/platform/glib/damage/layer-visibility-change.html:
* LayoutTests/platform/glib/damage/non-accelerated-canvas-2d-arc.html:
* LayoutTests/platform/glib/damage/non-accelerated-canvas-2d-downsizing.html:
* 
LayoutTests/platform/glib/damage/non-accelerated-canvas-2d-fillRect-w-offset.html:
* LayoutTests/platform/glib/damage/non-accelerated-canvas-2d-fillRect.html:
* LayoutTests/platform/glib/damage/non-accelerated-canvas-2d-new-canvas.html:
* LayoutTests/platform/glib/damage/non-accelerated-canvas-2d-path.html:
* LayoutTests/platform/glib/damage/non-accelerated-canvas-2d-putImageData.html:
* LayoutTests/platform/glib/damage/non-accelerated-canvas-2d-resizing.html:
* LayoutTests/platform/glib/damage/non-accelerated-canvas-2d-text.html:
* LayoutTests/platform/glib/damage/non-accelerated-canvas-2d-upsizing.html:
* LayoutTests/platform/glib/damage/scrolling-container-001.html:
* LayoutTests/platform/glib/damage/scrolling-container-002.html:
* LayoutTests/platform/glib/damage/scrolling-container-003.html:
* LayoutTests/platform/glib/damage/scrolling-container-004.html:
* LayoutTests/platform/glib/damage/scrolling-fullscreen-001.html:
* LayoutTests/platform/glib/damage/scrolling-fullscreen-002.html:
* LayoutTests/platform/glib/damage/scrolling-fullscreen-003.html:
* LayoutTests/platform/glib/damage/storage-and-simplification-algorithm.html:
* LayoutTests/platform/glib/damage/transform-2d-rotate.html:
* LayoutTests/platform/glib/damage/transform-2d-scale.html:
* LayoutTests/platform/glib/damage/transform-2d-skew.html:
* LayoutTests/platform/glib/damage/transform-2d-translate.html:
* LayoutTests/platform/glib/damage/transform-3d-dynamic-addition.html:
* LayoutTests/platform/glib/damage/transform-3d-dynamic-re-addition.html:
* LayoutTests/platform/glib/damage/transform-3d-dynamic-removal.html:
* LayoutTests/platform/glib/damage/transform-3d-rotate-1-axis.html:
* 
LayoutTests/platform/glib/damage/transform-3d-rotate-3-axes-content-update.html:
* LayoutTests/platform/glib/damage/transform-3d-rotate-3-axes.html:
* LayoutTests/platform/glib/damage/transform-3d-rotate-in-still-rotate.html:
* LayoutTests/platform/glib/damage/transform-3d-scale.html:
* 
LayoutTests/platform/glib/damage/transform-3d-translate-w-perspective-content-update.html:
* LayoutTests/platform/glib/damage/transform-3d-translate-w-perspective.html:
* LayoutTests/platform/glib/damage/transform-3d-translate.html:
* LayoutTests/platform/glib/damage/video.html:
* Source/WebCore/platform/graphics/Damage.h:
(WebCore::Damage::isEmpty const):
(WebCore::Damage::add):
(WebCore::FrameDamageHistory::damageInformation const):
(WebCore::FrameDamageHistory::addDamage):
(WebCore::operator<<):
(WebCore::Damage::invalid): Deleted.
(WebCore::Damage::region const): Deleted.
(WebCore::Damage::isInvalid const): Deleted.
* Source/WebCore/platform/graphics/texmap/TextureMapper.h:
(WebCore::TextureMapper::setDamage):
(WebCore::TextureMapper::damage const):
* Source/WebCore/platform/graphics/texmap/TextureMapperDamageVisualizer.cpp:
(WebCore::TextureMapperDamageVisualizer::paintDamage const):
* Source/WebCore/platform/graphics/texmap/TextureMapperDamageVisualizer.h:
* Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::setDamage):
* Source/WebCore/platform/graphics/texmap/TextureMapperLayer.h:
* 
Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedBackingStore.cpp:
(WebCore::CoordinatedBackingStore::paintToTextureMapper):
* 
Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayer.cpp:
(WebCore::CoordinatedPlatformLayer::flushCompositingState):
* Source/WebCore/testing/Internals.cpp:
(WebCore::Internals::getFrameDamageHistory const):
* Source/WebCore/testing/Internals.h:
* Source/WebCore/testing/Internals.idl:
* Source/WebKit/WebProcess/WebPage/AcceleratedSurface.h:
(WebKit::AcceleratedSurface::addDamage):
(WebKit::AcceleratedSurface::frameDamage const):
* Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/ThreadedCompositor.cpp:
(WebKit::ThreadedCompositor::paintToCurrentGLContext):
* Source/WebKit/WebProcess/WebPage/dmabuf/AcceleratedSurfaceDMABuf.cpp:
(WebKit::AcceleratedSurfaceDMABuf::RenderTarget::addDamage):
(WebKit::AcceleratedSurfaceDMABuf::SwapChain::addDamage):
(WebKit::AcceleratedSurfaceDMABuf::didRenderFrame):
(WebKit::AcceleratedSurfaceDMABuf::addDamage):
* Source/WebKit/WebProcess/WebPage/dmabuf/AcceleratedSurfaceDMABuf.h:
* Tools/TestWebKitAPI/Tests/WebCore/glib/Damage.cpp:
(TestWebKitAPI::TEST(Damage, Basics)):
(TestWebKitAPI::TEST(Damage, AddDamage)):

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



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

Reply via email to