Title: [295542] trunk
Revision
295542
Author
hironori.fu...@sony.com
Date
2022-06-14 15:22:40 -0700 (Tue, 14 Jun 2022)

Log Message

TextureMapperLayer - avoiding multiple regions in paintUsingOverlapRegions
https://bugs.webkit.org/show_bug.cgi?id=140101

Reviewed by Don Olmstead.

paintUsingOverlapRegions has a code to merge nonOverlapRegion into
overlapRegion to avoid dividing into multiple small areas if
overlapRegion is bigger than nonOverlapRegion.

However, if the overlap region is just 1 pixel small from all the 4
side, this check would not catch that.

* LayoutTests/platform/glib/TestExpectations:
* Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::paintUsingOverlapRegions):
Compare totalArea of overlapRegion and nonOverlapRegion.

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

Modified Paths

Diff

Modified: trunk/LayoutTests/platform/glib/TestExpectations (295541 => 295542)


--- trunk/LayoutTests/platform/glib/TestExpectations	2022-06-14 22:15:59 UTC (rev 295541)
+++ trunk/LayoutTests/platform/glib/TestExpectations	2022-06-14 22:22:40 UTC (rev 295542)
@@ -692,6 +692,7 @@
 imported/w3c/web-platform-tests/css/css-transforms/transform3d-translate3d-001.html [ Pass ]
 imported/w3c/web-platform-tests/css/css-transforms/ttwf-css-3d-polygon-cycle.html [ Pass ]
 
+webkit.org/b/241568 imported/w3c/web-platform-tests/css/css-transforms/transform3d-rotatex-perspective-003.html [ ImageOnlyFailure ]
 
 
 #////////////////////////////////////////////////////////////////////////////////////////

Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp (295541 => 295542)


--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp	2022-06-14 22:15:59 UTC (rev 295541)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp	2022-06-14 22:22:40 UTC (rev 295542)
@@ -397,7 +397,7 @@
 
     // Having both overlap and non-overlap regions carries some overhead. Avoid it if the overlap area
     // is big anyway.
-    if (overlapRegion.bounds().size().area() > nonOverlapRegion.bounds().size().area()) {
+    if (overlapRegion.totalArea() > nonOverlapRegion.totalArea()) {
         overlapRegion.unite(nonOverlapRegion);
         nonOverlapRegion = Region();
     }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to