Bug 265365 - [CoordinatedGraphics] Canvas 2D rendering context causes unnecessary tile invalidations
Summary: [CoordinatedGraphics] Canvas 2D rendering context causes unnecessary tile inv...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Canvas (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-11-27 01:37 PST by Jani Hautakangas
Modified: 2023-11-27 07:03 PST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jani Hautakangas 2023-11-27 01:37:55 PST
CanvasRenderingContext2DBase tracks one dirty rect and does union of all incoming dirty rects within repaint cycle.
In coordinated graphics, canvas is tiled and this unification of rects causes unnecessary invalidation of tiles which
are not dirty. For example in case where canvas spans over multiple tiles and only small areas at top-left and
bottom-right corners of canvas are changed. This scenario causes whole canvas and all tiles to be marked dirty because
of unification of dirty areas although only top-left and bottom-right tiles are actually dirty.
Comment 1 Jani Hautakangas 2023-11-27 01:44:40 PST
In coordinated graphics tiles do dirty rect unification internally
Comment 2 Jani Hautakangas 2023-11-27 01:50:17 PST
Pull request: https://github.com/WebKit/WebKit/pull/20917
Comment 3 EWS 2023-11-27 07:02:03 PST
Committed 271139@main (b2410e35eca0): <https://commits.webkit.org/271139@main>

Reviewed commits have been landed. Closing PR #20917 and removing active labels.
Comment 4 Radar WebKit Bug Importer 2023-11-27 07:03:14 PST
<rdar://problem/118832308>