WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
240639
Canvas.toDataURL causes excessive GPUP memory use on Cocoa
https://bugs.webkit.org/show_bug.cgi?id=240639
Summary
Canvas.toDataURL causes excessive GPUP memory use on Cocoa
Kimmo Kinnunen
Reported
2022-05-19 03:46:08 PDT
Canvas.toDataURL causes excessive GPUP memory use on Cocoa IOSurface -backed image -> CGBitmap copy -> compressed data string 1 (61.0M) CONTENT: VM: CG raster data + 1 (61.0M) mmap (in libsystem_kernel.dylib) + 0 [0x1dfc92c84] ..... + 1 (61.0M) CGBitmapContextCreateImage (in CoreGraphics) + 172 [0x1a6b6d444] + 1 (61.0M) WebKit::ShareableBitmap::makeCGImageCopy() (in WebKit) + 84 [0x10544eb60] + 1 (61.0M) WebKit::ImageBufferShareableBitmapBackend::copyNativeImage(WebCore::BackingStoreCopy) const (in WebKit) + 40 [0x105a7e1a4] + 1 (61.0M) WebCore::ImageBufferCGBackend::copyCGImageForEncoding(__CFString const*, WebCore::PreserveResolution) const (in WebCore) + 568 [0x113f87f34] + 1 (61.0M) WebCore::ImageBufferCGBackend::toDataURL(WTF::String const&, std::__1::optional<double>, WebCore::PreserveResolution) const (in WebCore) + 124 [0x113f883a0] + 1 (61.0M) WebKit::RemoteRenderingBackend::getDataURLForImageBufferWithQualifiedIdentifier(WTF::String const&, std::__1::optional<double>, WebCore::PreserveResolution, WebCore::ProcessQualified<WTF::ObjectIdentifier<WebCore::RenderingResourceIdentifierType> >, WTF::CompletionHandler<void (WTF::String&&)>&&) (in WebKit) + 124 [0x1057ac384] + 1 (61.0M) void IPC::handleMessageSynchronous<Messages::RemoteRenderingBackend::GetDataURLForImageBuffer, WebKit::RemoteRenderingBackend, void (WebKit::RemoteRenderingBackend::*)(WTF::String const&, std::__1::optional<double>, WebCore::PreserveResolution, WTF::ObjectIdentifier<WebCore::RenderingResourceIdentifierType>, WTF::CompletionHandler<void (WTF::String&&)>&&)>(IPC::StreamServerConnection&, IPC::Decoder&, WebKit::RemoteRenderingBackend*, void (WebKit::RemoteRenderingBackend::*)(WTF::String const&, std::__1::optional<double>, WebCore::PreserveResolution, WTF::ObjectIdentifier<WebCore::RenderingResourceIdentifierType>, WTF::CompletionHandler<void (WTF::String&&)>&&)) (in WebKit) + 232 [0x10579cdf0]
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2022-05-19 03:48:16 PDT
<
rdar://problem/93567863
>
Kimmo Kinnunen
Comment 2
2022-05-19 08:59:13 PDT
Should probably be fixed by removing ImageBuffer::toData / ImageBuffer::toDataURL and using data(), dataURL(), String dataURL(ImageBuffer&, const String& mimeType, std::optional<double> quality = std::nullopt, PreserveResolution preserveResolution) Vector<uint8_t> toData(ImageBuffer&, const String& mimeType, std::optional<double> quality = std::nullopt)
Kimmo Kinnunen
Comment 3
2022-06-08 23:35:00 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/1407
Nikos Mouchtaris
Comment 4
2022-06-14 17:50:21 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/1528
Nikos Mouchtaris
Comment 5
2022-06-23 14:19:59 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/1741
EWS
Comment 6
2022-06-29 20:16:29 PDT
Committed
251974@main
(bc684eeb57fb): <
https://commits.webkit.org/251974@main
> Reviewed commits have been landed. Closing PR #1741 and removing active labels.
Claudio Saavedra
Comment 7
2022-06-30 04:31:49 PDT
Reopening as the change was reverted, see
https://github.com/WebKit/WebKit/pull/1940
Nikos Mouchtaris
Comment 8
2022-06-30 10:36:42 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/1951
EWS
Comment 9
2022-06-30 23:40:02 PDT
Committed
252032@main
(55390aa216e4): <
https://commits.webkit.org/252032@main
> Reviewed commits have been landed. Closing PR #1951 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug