Bug 247042

Summary: TextureMapper: Calculate the bounding box of a layer transformed by 4x4 matrix precisely by intersecting with the viewport
Product: WebKit Reporter: Fujii Hironori <Hironori.Fujii>
Component: PlatformAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
test case none

Description Fujii Hironori 2022-10-25 18:28:29 PDT
Created attachment 463245 [details]
test case

bug#244824 added transformedBoundingBox to calculate the bounding box of a layer transformed by 4x4 matrix.
However, it isn't precise.
For example, in the test case, the right side of the blue element is at infinity.
transformedBoundingBox is assuming the positions of the right side are (inf, inf) and (-inf, -inf).
We can calculate more precise bounding box by intersecting element edges with the viewport.
Comment 1 Radar WebKit Bug Importer 2022-11-01 18:29:17 PDT
<rdar://problem/101835693>