Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(431)

Unified Diff: third_party/WebKit/Source/modules/webgl/WebGLRenderingContext.h

Issue 1881563003: Implement OffscreenCanvas.getContext('webgl') (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase and remove static_cast Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/webgl/WebGLRenderingContext.h
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContext.h b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContext.h
index e0f6a0b313dd55d7da2c93bb836e9a8d43533c44..b2f654879e08af288b634b3b86365866e8e1de00 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContext.h
+++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContext.h
@@ -43,6 +43,7 @@ public:
~Factory() override {}
CanvasRenderingContext* create(HTMLCanvasElement*, const CanvasContextCreationAttributes&, Document&) override;
+ CanvasRenderingContext* create(ScriptState*, OffscreenCanvas*, const CanvasContextCreationAttributes&) override;
CanvasRenderingContext::ContextType getContextType() const override { return CanvasRenderingContext::ContextWebgl; }
void onError(HTMLCanvasElement*, const String& error) override;
};
@@ -50,16 +51,19 @@ public:
~WebGLRenderingContext() override;
CanvasRenderingContext::ContextType getContextType() const override { return CanvasRenderingContext::ContextWebgl; }
+ ImageBitmap* transferToImageBitmap(ExceptionState&) final;
unsigned version() const override { return 1; }
String contextName() const override { return "WebGLRenderingContext"; }
void registerContextExtensions() override;
void setCanvasGetContextResult(RenderingContext&) final;
+ void setOffscreenCanvasGetContextResult(OffscreenRenderingContext&) final;
EAGERLY_FINALIZE();
DECLARE_VIRTUAL_TRACE();
private:
WebGLRenderingContext(HTMLCanvasElement*, PassOwnPtr<WebGraphicsContext3DProvider>, const WebGLContextAttributes&);
+ WebGLRenderingContext(OffscreenCanvas*, PassOwnPtr<WebGraphicsContext3DProvider>, const WebGLContextAttributes&);
// Enabled extension objects.
Member<ANGLEInstancedArrays> m_angleInstancedArrays;

Powered by Google App Engine
This is Rietveld 408576698