Index: third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h |
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h |
index a78cbf82e0ff00bf5530292b8155f3006eb8d47b..5d31262e6980df3180890d24afc57cea85f70599 100644 |
--- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h |
+++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h |
@@ -131,7 +131,6 @@ class MODULES_EXPORT WebGLRenderingContextBase : public CanvasRenderingContext { |
public: |
~WebGLRenderingContextBase() override; |
- virtual unsigned version() const = 0; |
virtual String contextName() const = 0; |
virtual void registerContextExtensions() = 0; |
@@ -143,6 +142,8 @@ public: |
static std::unique_ptr<WebGraphicsContext3DProvider> createWebGraphicsContext3DProvider(ScriptState*, WebGLContextAttributes, unsigned webGLVersion); |
static void forceNextWebGLContextCreationToFail(); |
+ unsigned version() const { return m_version; } |
+ |
int drawingBufferWidth() const; |
int drawingBufferHeight() const; |
@@ -430,8 +431,8 @@ protected: |
friend class ScopedTexture2DRestorer; |
friend class ScopedFramebufferRestorer; |
- WebGLRenderingContextBase(HTMLCanvasElement*, std::unique_ptr<WebGraphicsContext3DProvider>, const WebGLContextAttributes&); |
- WebGLRenderingContextBase(OffscreenCanvas*, std::unique_ptr<WebGraphicsContext3DProvider>, const WebGLContextAttributes&); |
+ WebGLRenderingContextBase(HTMLCanvasElement*, std::unique_ptr<WebGraphicsContext3DProvider>, const WebGLContextAttributes&, unsigned); |
+ WebGLRenderingContextBase(OffscreenCanvas*, std::unique_ptr<WebGraphicsContext3DProvider>, const WebGLContextAttributes&, unsigned); |
PassRefPtr<DrawingBuffer> createDrawingBuffer(std::unique_ptr<WebGraphicsContext3DProvider>); |
void setupFlags(); |
@@ -1107,10 +1108,12 @@ protected: |
static const char* getTexImageFunctionName(TexImageFunctionID); |
private: |
- WebGLRenderingContextBase(HTMLCanvasElement*, OffscreenCanvas*, std::unique_ptr<WebGraphicsContext3DProvider>, const WebGLContextAttributes&); |
+ WebGLRenderingContextBase(HTMLCanvasElement*, OffscreenCanvas*, std::unique_ptr<WebGraphicsContext3DProvider>, const WebGLContextAttributes&, unsigned); |
static std::unique_ptr<WebGraphicsContext3DProvider> createContextProviderInternal(HTMLCanvasElement*, ScriptState*, WebGLContextAttributes, unsigned); |
void texImageCanvasByGPU(HTMLCanvasElement*, GLuint, GLenum, GLenum, GLint); |
void texImageBitmapByGPU(ImageBitmap*, GLuint, GLenum, GLenum, GLint, bool); |
+ |
+ const unsigned m_version; |
}; |
DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, context->is3d(), context.is3d()); |