Bug 219705 - [GPU Process]: Recording an in-process ImageBuffer drawing has to convert it to a NativeImage first
Summary: [GPU Process]: Recording an in-process ImageBuffer drawing has to convert it ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Canvas (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Said Abou-Hallawa
URL:
Keywords: InRadar
: 218871 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-12-09 13:22 PST by Said Abou-Hallawa
Modified: 2021-03-05 10:27 PST (History)
4 users (show)

See Also:


Attachments
Patch (6.67 KB, patch)
2020-12-09 13:41 PST, Said Abou-Hallawa
wenson_hsieh: review+
Details | Formatted Diff | Diff
Patch (6.63 KB, patch)
2020-12-09 14:00 PST, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Said Abou-Hallawa 2020-12-09 13:22:57 PST
We should not send the ImageBuffer to GPUP if it's created in-process. We should let ImageBuffer::draw() extract a NativeImage of it first. Then GraphicsContext::drawNativeImage() sends this NativeImage to GPUP.
Comment 1 Said Abou-Hallawa 2020-12-09 13:41:33 PST
Created attachment 415795 [details]
Patch
Comment 2 Said Abou-Hallawa 2020-12-09 13:46:17 PST
This patch allows drawing the test case in bug 218871. The drawing of the PDF still happens in WebP. We draw the PDF to an ImageBuffer first and then draw this ImageBuffer to the canvas.
Comment 3 Wenson Hsieh 2020-12-09 13:51:03 PST
Comment on attachment 415795 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=415795&action=review

> Source/WebCore/platform/graphics/GraphicsContextImpl.h:42
> +    virtual bool canRecordDrawImageBuffer(const ImageBuffer&) const { return true; }

It seems like this should just be `canDrawImageBuffer` instead, since it's on the GraphicsContextImpl (of which DisplayList::Recorder is one particular implementation).
Comment 4 Said Abou-Hallawa 2020-12-09 14:00:15 PST
Created attachment 415796 [details]
Patch
Comment 5 EWS 2020-12-09 15:01:34 PST
Committed r270605: <https://trac.webkit.org/changeset/270605>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 415796 [details].
Comment 6 Radar WebKit Bug Importer 2020-12-09 15:03:34 PST
<rdar://problem/72155021>
Comment 7 Said Abou-Hallawa 2021-03-05 10:27:53 PST
*** Bug 218871 has been marked as a duplicate of this bug. ***