Bug 219705

Summary: [GPU Process]: Recording an in-process ImageBuffer drawing has to convert it to a NativeImage first
Product: WebKit Reporter: Said Abou-Hallawa <sabouhallawa>
Component: CanvasAssignee: Said Abou-Hallawa <sabouhallawa>
Status: RESOLVED FIXED    
Severity: Normal CC: dino, simon.fraser, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=218871
Attachments:
Description Flags
Patch
wenson_hsieh: review+
Patch none

Said Abou-Hallawa
Reported 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.
Attachments
Patch (6.67 KB, patch)
2020-12-09 13:41 PST, Said Abou-Hallawa
wenson_hsieh: review+
Patch (6.63 KB, patch)
2020-12-09 14:00 PST, Said Abou-Hallawa
no flags
Said Abou-Hallawa
Comment 1 2020-12-09 13:41:33 PST
Said Abou-Hallawa
Comment 2 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.
Wenson Hsieh
Comment 3 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).
Said Abou-Hallawa
Comment 4 2020-12-09 14:00:15 PST
EWS
Comment 5 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].
Radar WebKit Bug Importer
Comment 6 2020-12-09 15:03:34 PST
Said Abou-Hallawa
Comment 7 2021-03-05 10:27:53 PST
*** Bug 218871 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.