Bug 241127 - ImageBuffer::copyImage consumes GPUP memory and is redundant
Summary: ImageBuffer::copyImage consumes GPUP memory and is redundant
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Canvas (show other bugs)
Version: Safari 13
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kimmo Kinnunen
URL:
Keywords: InRadar
Depends on:
Blocks: 240639 242239
  Show dependency treegraph
 
Reported: 2022-05-31 06:14 PDT by Kimmo Kinnunen
Modified: 2022-07-01 03:52 PDT (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 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.