| 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 6c23f299fd15dba7aa3293daf61be08a3b0fb0e9..8c354e6d7b10d1e68cbe7ebfbdda05137608769b 100644
|
| --- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContext.h
|
| +++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContext.h
|
| @@ -27,6 +27,8 @@
|
| #define WebGLRenderingContext_h
|
|
|
| #include "core/html/canvas/CanvasRenderingContextFactory.h"
|
| +#include "modules/offscreencanvas/OffscreenCanvasRenderingContext.h"
|
| +#include "modules/offscreencanvas/OffscreenCanvasRenderingContextFactory.h"
|
| #include "modules/webgl/WebGLRenderingContextBase.h"
|
|
|
| namespace blink {
|
| @@ -47,19 +49,34 @@ public:
|
| void onError(HTMLCanvasElement*, const String& error) override;
|
| };
|
|
|
| + class OffscreenCanvasFactory : public OffscreenCanvasRenderingContextFactory {
|
| + WTF_MAKE_NONCOPYABLE(OffscreenCanvasFactory);
|
| + public:
|
| + OffscreenCanvasFactory() {}
|
| + ~OffscreenCanvasFactory() override {}
|
| +
|
| + OffscreenCanvasRenderingContext* create(ScriptState*, OffscreenCanvas*, const CanvasContextCreationAttributes& attrs) override;
|
| + OffscreenCanvasRenderingContext::ContextType getContextType() const override { return OffscreenCanvasRenderingContext::ContextWebgl; }
|
| + void onError(OffscreenCanvas* canvas, const String& error) override {}
|
| + };
|
| +
|
| ~WebGLRenderingContext() override;
|
|
|
| CanvasRenderingContext::ContextType getContextType() const override { return CanvasRenderingContext::ContextWebgl; }
|
| + OffscreenCanvasRenderingContext::ContextType getOffscreenCanvasRenderingContextType() const override { return OffscreenCanvasRenderingContext::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;
|
|
|