Bug 203884

Summary: [Cairo] Cairo graphics backend uses ImageBuffer::copyImage just to access native image buffer handles
Product: WebKit Reporter: Chris Lord <clord>
Component: Layout and RenderingAssignee: Chris Lord <clord>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, bfulgham, cgarcia, commit-queue, don.olmstead, Hironori.Fujii, sabouhallawa, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 182686    
Attachments:
Description Flags
Patch none

Chris Lord
Reported 2019-11-06 02:50:08 PST
This pattern occurs a lot in the Cairo graphics backend: RefPtr<Image> image = layerImage.copyImage(DontCopyBackingStore); if (!image) return; if (auto surface = image->nativeImageForCurrentFrame()) { ... } Which is fine on a single thread, but ImageSource is not usable off-main-thread, so any drawing that calls functions that do this will cause an assert on a debug build. I think its use of ImageSource would be safe off-main-thread, but it's overkill just to get the native image handle. This is hampering OffscreenCanvas.
Attachments
Patch (7.06 KB, patch)
2019-11-06 03:01 PST, Chris Lord
no flags
Chris Lord
Comment 1 2019-11-06 03:01:43 PST
WebKit Commit Bot
Comment 2 2019-11-06 05:13:17 PST
Comment on attachment 382908 [details] Patch Clearing flags on attachment: 382908 Committed r252136: <https://trac.webkit.org/changeset/252136>
WebKit Commit Bot
Comment 3 2019-11-06 05:13:19 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 4 2019-11-06 05:14:18 PST
Note You need to log in before you can comment on or make changes to this bug.