Bug 241127

Summary: ImageBuffer::copyImage consumes GPUP memory and is redundant
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: Safari 13   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 240639, 242239    

Description Kimmo Kinnunen 2022-05-31 06:14:52 PDT
ImageBuffer::copyImage consumes GPUP memory and is redundant

ImageBuffer::copyImage overrides:
- Always ends up returning BitmapImage
- Always ends up constructing BitmapImage from copyNativeImage
- Is implemented erroneously in many backends, ignoring the preserve resolution scale flag
- Is implemented correctly in ImageBufferCGBackend, but will allocate the destination buffer when trying to honour the PreserveResolution::No. This will cause a large unattributed allocation in GPUP
Comment 1 Kimmo Kinnunen 2022-06-01 01:57:15 PDT
Pull request: https://github.com/WebKit/WebKit/pull/1204
Comment 2 Radar WebKit Bug Importer 2022-06-07 06:16:14 PDT
<rdar://problem/94522061>
Comment 3 EWS 2022-06-07 06:44:40 PDT
Committed r295343 (251359@main): <https://commits.webkit.org/251359@main>

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