Bug 268608

Summary: Draws to unused 2D contexts may consume excessive amount of memory on Cocoa
Product: WebKit Reporter: Kimmo Kinnunen <kkinnunen>
Component: CanvasAssignee: Kimmo Kinnunen <kkinnunen>
Status: RESOLVED FIXED    
Severity: Normal CC: dino, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   

Description Kimmo Kinnunen 2024-02-02 00:34:23 PST
Unused canvas draws consume memory

Draw canvas A to 2d context B
Update canvas A
Draw canvas A to 2d context B
Update canvas A
Draw canvas A to 2d context B

Don't use canvas B

Cauese each draw to stay in context B queue, as the results are not used.
Causes each update to A to migrate the data to COW buffer
Comment 1 Kimmo Kinnunen 2024-02-02 00:35:03 PST
<rdar://117708049>
Comment 2 Kimmo Kinnunen 2024-02-02 01:16:24 PST
Pull request: https://github.com/WebKit/WebKit/pull/23733
Comment 3 EWS 2024-02-06 11:45:43 PST
Committed 274164@main (da9744107a30): <https://commits.webkit.org/274164@main>

Reviewed commits have been landed. Closing PR #23733 and removing active labels.