WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
239874
[GPU Process] NativeImage should share the ShareableBitmap data when it's sent to GPU Process
https://bugs.webkit.org/show_bug.cgi?id=239874
Summary
[GPU Process] NativeImage should share the ShareableBitmap data when it's sen...
Said Abou-Hallawa
Reported
2022-04-28 15:03:44 PDT
Instead of allocating a new memory buffer in GPUProcess and copying the ShareableBitmap data to it, we can create a PlatformImage that directly references this data. This will make all the NativeImages data be attributed to WebProcess.
Attachments
Patch
(16.21 KB, patch)
2022-04-28 15:41 PDT
,
Said Abou-Hallawa
no flags
Details
Formatted Diff
Diff
Patch
(17.67 KB, patch)
2022-04-29 12:10 PDT
,
Said Abou-Hallawa
no flags
Details
Formatted Diff
Diff
Patch
(18.67 KB, patch)
2022-05-02 02:05 PDT
,
Said Abou-Hallawa
simon.fraser
: review+
Details
Formatted Diff
Diff
Patch
(18.96 KB, patch)
2022-05-05 00:59 PDT
,
Said Abou-Hallawa
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Said Abou-Hallawa
Comment 1
2022-04-28 15:04:47 PDT
rdar://92031359
Said Abou-Hallawa
Comment 2
2022-04-28 15:41:04 PDT
Created
attachment 458550
[details]
Patch
Said Abou-Hallawa
Comment 3
2022-04-29 12:10:26 PDT
Created
attachment 458600
[details]
Patch
Said Abou-Hallawa
Comment 4
2022-05-02 02:05:00 PDT
Created
attachment 458668
[details]
Patch
Chris Dumez
Comment 5
2022-05-04 16:25:19 PDT
Comment on
attachment 458668
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=458668&action=review
> Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.cpp:350 > + auto image = NativeImage::create(bitmap->createPlatformImage(DontCopyBackingStore, true), nativeImageResourceIdentifier.object());
The `true` here is not really readable. I suggest using an enum class to replace this boolean to make call sites more readable.
> Source/WebKit/Shared/ShareableBitmap.h:118 > + RetainPtr<CGImageRef> makeCGImage(bool shouldInterpolate = false);
parameter should be an enum class : bool.
> Source/WebKit/Shared/ShareableBitmap.h:120 > + WebCore::PlatformImagePtr createPlatformImage(WebCore::BackingStoreCopy = WebCore::CopyBackingStore, bool shouldInterpolate = false);
ditto.
> Source/WebKit/Shared/ShareableBitmap.h:127 > + WebCore::PlatformImagePtr createPlatformImage(WebCore::BackingStoreCopy = WebCore::CopyBackingStore, bool shouldInterpolate = false) { return createCairoSurface(); }
ditto.
> Source/WebKit/Shared/ShareableBitmap.h:134 > + RetainPtr<CGImageRef> createCGImage(CGDataProviderRef, bool shouldInterpolate) const;
ditto.
> Source/WebKit/Shared/cg/ShareableBitmapCG.cpp:178 > + RetainPtr<CGDataProvider> dataProvider = adoptCF(CGDataProviderCreateWithData(this, data(), sizeInBytes(), [](void* typelessBitmap, const void* typelessData, size_t) {
auto
> Source/WebKit/Shared/cg/ShareableBitmapCG.cpp:179 > + ShareableBitmap* bitmap = static_cast<ShareableBitmap*>(typelessBitmap);
auto*
Said Abou-Hallawa
Comment 6
2022-05-05 00:59:57 PDT
Created
attachment 458856
[details]
Patch
EWS
Comment 7
2022-05-05 11:01:29 PDT
Committed
r293846
(
250317@main
): <
https://commits.webkit.org/250317@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 458856
[details]
.
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