Bug 202679

Summary: Web Inspector: Canvas: don't show an empty preview for WebGPU devices
Product: WebKit Reporter: Devin Rousso <hi>
Component: Web InspectorAssignee: Devin Rousso <hi>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, hi, inspector-bugzilla-changes, jonlee, mattbaker, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
none
[Image] After Patch is applied none

Devin Rousso
Reported 2019-10-07 21:00:20 PDT
`HTMLCanvasElement.prototype.toDataURL` hasn't been hooked up for `GPUCanvasContext` yet, so calling `Canvas.requestContent` with a `WebGPUDevice` won't give us any good results. As such, the Web Inspector frontend should show something slightly more actionable, or at the very least something less obviously wrong.
Attachments
Patch (3.18 KB, patch)
2019-10-07 21:08 PDT, Devin Rousso
no flags
[Image] After Patch is applied (604.00 KB, image/png)
2019-10-07 21:09 PDT, Devin Rousso
no flags
Devin Rousso
Comment 1 2019-10-07 21:08:46 PDT
Devin Rousso
Comment 2 2019-10-07 21:09:02 PDT
Created attachment 380394 [details] [Image] After Patch is applied
Matt Baker
Comment 3 2019-10-08 12:01:35 PDT
Comment on attachment 380393 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=380393&action=review r=me > Source/WebInspectorUI/UserInterface/Models/Canvas.js:127 > + return true; I know this was written with future contextTypes in mind, but I'd just replace it with: return contextType !== Canvas.ContextType.WebGPU && contextType !== Canvas.ContextType.WebMetal;
Devin Rousso
Comment 4 2019-10-08 12:32:42 PDT
Comment on attachment 380393 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=380393&action=review >> Source/WebInspectorUI/UserInterface/Models/Canvas.js:127 >> + return true; > > I know this was written with future contextTypes in mind, but I'd just replace it with: > > return contextType !== Canvas.ContextType.WebGPU && contextType !== Canvas.ContextType.WebMetal; I personally prefer this, as it's more future-proof.
WebKit Commit Bot
Comment 5 2019-10-08 13:49:55 PDT
Comment on attachment 380393 [details] Patch Clearing flags on attachment: 380393 Committed r250858: <https://trac.webkit.org/changeset/250858>
WebKit Commit Bot
Comment 6 2019-10-08 13:49:57 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 7 2019-10-08 14:25:02 PDT
Note You need to log in before you can comment on or make changes to this bug.