Bug 140101

Summary: [TexMap]TextureMapperLayer - avoiding multiple regions in paintUsingOverlapRegions
Product: WebKit Reporter: abaldeva
Component: WebCore Misc.Assignee: Fujii Hironori <Hironori.Fujii>
Severity: Normal CC: cmarcelo, don.olmstead, ews-watchlist, Hironori.Fujii, kondapallykalyan, luiz, magomez, webkit-bug-importer, zdobersek
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Description Flags
1 pixel offset overlapping region
Patch none

Description abaldeva 2015-01-05 15:13:09 PST
Created attachment 244009 [details]
1 pixel offset overlapping region


In TextureMapperLayer::paintUsingOverlapRegions, there is a check to avoid dividing the area between overlapping and nonoverlapping. The current check is 
if (overlapRegion.bounds().size().area() > nonOverlapRegion.bounds().size().area())

However, I think it is incorrect. If the overlap region is just 1 pixel small from all the 4 side, this check would not catch that. Attached an html that reproduces the issue. 

Seems to me that the correct check should be 
if (overlapRegion.totalArea() > nonOverlapRegion.totalArea)

Comment 1 Fujii Hironori 2020-10-12 14:36:02 PDT
The code was added by r149369 (Bug 115226).
Comment 2 Fujii Hironori 2022-06-09 19:05:19 PDT
(In reply to abaldeva from comment #0)
> Seems to me that the correct check should be 
> if (overlapRegion.totalArea() > nonOverlapRegion.totalArea)
> Thoughts?

It sounds like a good idea to me. Will prepare a patch.
Comment 3 Fujii Hironori 2022-06-09 19:23:01 PDT
Created attachment 460152 [details]
Comment 4 Fujii Hironori 2022-06-13 14:18:17 PDT
gtk-wk2 EWS reports a test failure.

imported/w3c/web-platform-tests/css/css-transforms/transform3d-rotatex-perspective-003.html [ ImageOnlyFailure ]

This is a true-positive. Created bug#241568 for it.
Comment 5 Fujii Hironori 2022-06-13 14:30:59 PDT
Created attachment 460215 [details]
Comment 6 EWS 2022-06-14 15:22:49 PDT
Committed r295542 (251547@main): <https://commits.webkit.org/251547@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 460215 [details].
Comment 7 Radar WebKit Bug Importer 2022-06-14 15:23:13 PDT