Bug 180050 - Implement OffscreenCanvas.getContext("webgl")
Summary: Implement OffscreenCanvas.getContext("webgl")
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Canvas (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Dean Jackson
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-11-27 13:04 PST by Dean Jackson
Modified: 2017-11-27 14:13 PST (History)
11 users (show)

See Also:


Attachments
Patch (31.26 KB, patch)
2017-11-27 13:18 PST, Dean Jackson
sam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dean Jackson 2017-11-27 13:04:45 PST
Implement OffscreenCanvas.getContext("webgl")
Comment 1 Radar WebKit Bug Importer 2017-11-27 13:07:10 PST
<rdar://problem/35705473>
Comment 2 Dean Jackson 2017-11-27 13:18:12 PST
Created attachment 327666 [details]
Patch
Comment 3 Sam Weinig 2017-11-27 13:32:17 PST
Comment on attachment 327666 [details]
Patch

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

> Source/WebCore/html/OffscreenCanvas.cpp:81
> +    if (m_context)
> +        return { RefPtr<WebGLRenderingContext> { &downcast<WebGLRenderingContext>(*m_context) } };

I think this should only return m_context if contextType == RenderingContextType::Webgl. Otherwise, it should be nullptr.
Comment 4 Dean Jackson 2017-11-27 14:13:07 PST
Committed r225193: <https://trac.webkit.org/changeset/225193>