Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8c5ed5fa2b4ed92b3dd8223929b994218116392f
      
https://github.com/WebKit/WebKit/commit/8c5ed5fa2b4ed92b3dd8223929b994218116392f
  Author: Nikolas Zimmermann <[email protected]>
  Date:   2026-09-28 (Mon, 28 Sep 2026)

  Changed paths:
    M LayoutTests/platform/glib/damage/transform-3d-edge-at-infinity.html
    A 
LayoutTests/platform/glib/damage/transform-scale-crossing-clip-edge-expected.txt
    A LayoutTests/platform/glib/damage/transform-scale-crossing-clip-edge.html
    A 
LayoutTests/platform/glib/damage/transform-skew-corner-just-inside-clip-edge-expected.txt
    A 
LayoutTests/platform/glib/damage/transform-skew-corner-just-inside-clip-edge.html
    M Source/WebCore/platform/graphics/Polygon4D.cpp
    M Source/WebCore/platform/graphics/Polygon4D.h
    M 
Source/WebCore/platform/graphics/skia/SkiaCompositingLayerOverlapRegions.cpp

  Log Message:
  -----------
  [GTK][WPE] Simplify clipping in projectedBoundingBox()
https://bugs.webkit.org/show_bug.cgi?id=325380

Reviewed by Fujii Hironori.

Follow-up to 321905@main, which clips a layer against the camera plane and
then against the four sides of the clip bounds, seperately. Merge the
steps so that Polygon4D::clipToFrontOfCamera() does both in one go, rendering
Polygon4D::clipToPlane() unncessary.

While at it, fix two small errors in the clipping procedure: The sides now use
no tolerance, because with it a thin visible part of the layer next to a side
could be dropped (transform-skew-corner-just-inside-clip-edge.html). Also,
coordinates that both ends of an edge share are now copied instead of
interpolated, so axis-aligned layers no longer grow by a pixel from rounding
(transform-scale-crossing-clip-edge.html).

Tests: platform/glib/damage/transform-scale-crossing-clip-edge.html
       platform/glib/damage/transform-skew-corner-just-inside-clip-edge.html

* LayoutTests/platform/glib/damage/transform-3d-edge-at-infinity.html:
  Fix comment.
* 
LayoutTests/platform/glib/damage/transform-scale-crossing-clip-edge-expected.txt:
 Added.
* LayoutTests/platform/glib/damage/transform-scale-crossing-clip-edge.html: 
Added.
* 
LayoutTests/platform/glib/damage/transform-skew-corner-just-inside-clip-edge-expected.txt:
 Added.
* 
LayoutTests/platform/glib/damage/transform-skew-corner-just-inside-clip-edge.html:
 Added.
* Source/WebCore/platform/graphics/Polygon4D.cpp:
(WebCore::splitPolygon):
(WebCore::Polygon4D::clipToFrontOfCamera):
(WebCore::Polygon4D::clipToPlane): Deleted.
* Source/WebCore/platform/graphics/Polygon4D.h:
(WebCore::Polygon4D::clipToFrontOfCamera):
* Source/WebCore/platform/graphics/skia/SkiaCompositingLayerOverlapRegions.cpp:
(WebCore::projectedBoundingBox):

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



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

Reply via email to