Bug 232733 - "OffscreenCanvas" in IDLs doesn't seem to be able to be compiled
Summary: "OffscreenCanvas" in IDLs doesn't seem to be able to be compiled
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Bindings (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Dan Glastonbury
URL:
Keywords: InRadar
Depends on:
Blocks: 232558
  Show dependency treegraph
 
Reported: 2021-11-04 16:25 PDT by Myles C. Maxfield
Modified: 2022-03-04 11:17 PST (History)
7 users (show)

See Also:


Attachments
Patch (5.46 KB, patch)
2022-03-03 21:58 PST, Dan Glastonbury
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Myles C. Maxfield 2021-11-04 16:25:21 PDT
There are a few comments in our bindings code:

// FIXME: OffscreenCanvas doesn't seem to work with our bindings here.
Comment 1 Radar WebKit Bug Importer 2021-11-11 15:26:18 PST
<rdar://problem/85318653>
Comment 2 Dan Glastonbury 2022-03-02 19:20:28 PST
Notes on how to handle OffscreenCanvas from slack:

typedef (HTMLImageElement
#if defined(ENABLE_VIDEO) && ENABLE_VIDEO
    or HTMLVideoElement
#endif
    or HTMLCanvasElement
    or ImageBitmap
#if defined(ENABLE_OFFSCREEN_CANVAS) && ENABLE_OFFSCREEN_CANVAS
    or OffscreenCanvas
#endif
#if defined(ENABLE_CSS_TYPED_OM) && ENABLE_CSS_TYPED_OM
    or CSSStyleImageValue
#endif
) CanvasImageSource;
Comment 3 Dan Glastonbury 2022-03-03 21:58:15 PST
Created attachment 453812 [details]
Patch
Comment 4 Dan Glastonbury 2022-03-03 22:02:53 PST
Comment on attachment 453812 [details]
Patch

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

> Source/WebCore/Modules/WebGPU/GPUCanvasContext.h:45
> +    using CanvasType = std::variant<RefPtr<HTMLCanvasElement>, RefPtr<OffscreenCanvas>>;

I'm happy to bike shed the name `CanvasType`.

> Source/WebCore/Modules/WebGPU/GPUImageCopyExternalImage.h:41
> +    using SourceType = std::variant<RefPtr<ImageBitmap>, RefPtr<HTMLCanvasElement>, RefPtr<OffscreenCanvas>>;

I'm happy to bike shed the name `SourceType`.
Comment 5 EWS 2022-03-04 11:17:00 PST
Committed r290838 (248074@main): <https://commits.webkit.org/248074@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 453812 [details].