| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef WebGL2RenderingContextBase_h | 5 #ifndef WebGL2RenderingContextBase_h |
| 6 #define WebGL2RenderingContextBase_h | 6 #define WebGL2RenderingContextBase_h |
| 7 | 7 |
| 8 #include "bindings/core/v8/ScriptPromise.h" | 8 #include "bindings/core/v8/ScriptPromise.h" |
| 9 #include "bindings/core/v8/TraceWrapperMember.h" | 9 #include "bindings/core/v8/TraceWrapperMember.h" |
| 10 #include "modules/webgl/WebGLExtension.h" | 10 #include "modules/webgl/WebGLExtension.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 class WebGLProgram; | 21 class WebGLProgram; |
| 22 class WebGLQuery; | 22 class WebGLQuery; |
| 23 class WebGLSampler; | 23 class WebGLSampler; |
| 24 class WebGLSync; | 24 class WebGLSync; |
| 25 class WebGLTransformFeedback; | 25 class WebGLTransformFeedback; |
| 26 class WebGLUniformLocation; | 26 class WebGLUniformLocation; |
| 27 class WebGLVertexArrayObject; | 27 class WebGLVertexArrayObject; |
| 28 | 28 |
| 29 class WebGL2RenderingContextBase : public WebGLRenderingContextBase { | 29 class WebGL2RenderingContextBase : public WebGLRenderingContextBase { |
| 30 public: | 30 public: |
| 31 ~WebGL2RenderingContextBase() override; | |
| 32 | |
| 33 void destroyContext() override; | 31 void destroyContext() override; |
| 34 | 32 |
| 35 /* Buffer objects */ | 33 /* Buffer objects */ |
| 36 void bufferData(GLenum, DOMArrayBufferView*, GLenum, GLuint, GLuint); | 34 void bufferData(GLenum, DOMArrayBufferView*, GLenum, GLuint, GLuint); |
| 37 void bufferSubData(GLenum, GLintptr, DOMArrayBufferView*, GLuint, GLuint); | 35 void bufferSubData(GLenum, GLintptr, DOMArrayBufferView*, GLuint, GLuint); |
| 38 // Have to re-declare/re-define the following buffer{Sub}Data functions from | 36 // Have to re-declare/re-define the following buffer{Sub}Data functions from |
| 39 // base class. This is because the above buffer{Sub}Data() hides the name | 37 // base class. This is because the above buffer{Sub}Data() hides the name |
| 40 // from base class. | 38 // from base class. |
| 41 void bufferData(GLenum target, long long size, GLenum usage); | 39 void bufferData(GLenum target, long long size, GLenum usage); |
| 42 void bufferData(GLenum target, DOMArrayBuffer* data, GLenum usage); | 40 void bufferData(GLenum target, DOMArrayBuffer* data, GLenum usage); |
| (...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 737 void pixelStorei(GLenum pname, GLint param) override; | 735 void pixelStorei(GLenum pname, GLint param) override; |
| 738 void readPixels(GLint x, | 736 void readPixels(GLint x, |
| 739 GLint y, | 737 GLint y, |
| 740 GLsizei width, | 738 GLsizei width, |
| 741 GLsizei height, | 739 GLsizei height, |
| 742 GLenum format, | 740 GLenum format, |
| 743 GLenum type, | 741 GLenum type, |
| 744 DOMArrayBufferView* pixels) override; | 742 DOMArrayBufferView* pixels) override; |
| 745 void restoreCurrentFramebuffer() override; | 743 void restoreCurrentFramebuffer() override; |
| 746 | 744 |
| 747 EAGERLY_FINALIZE(); | |
| 748 DECLARE_VIRTUAL_TRACE(); | 745 DECLARE_VIRTUAL_TRACE(); |
| 749 DECLARE_VIRTUAL_TRACE_WRAPPERS(); | 746 DECLARE_VIRTUAL_TRACE_WRAPPERS(); |
| 750 | 747 |
| 751 protected: | 748 protected: |
| 752 friend class V8WebGL2RenderingContext; | 749 friend class V8WebGL2RenderingContext; |
| 753 | 750 |
| 754 WebGL2RenderingContextBase( | 751 WebGL2RenderingContextBase( |
| 755 HTMLCanvasElement*, | 752 HTMLCanvasElement*, |
| 756 std::unique_ptr<WebGraphicsContext3DProvider>, | 753 std::unique_ptr<WebGraphicsContext3DProvider>, |
| 757 const CanvasContextCreationAttributes& requestedAttributes); | 754 const CanvasContextCreationAttributes& requestedAttributes); |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 924 context, | 921 context, |
| 925 context->is3d() && | 922 context->is3d() && |
| 926 WebGLRenderingContextBase::getWebGLVersion(context) >= 2, | 923 WebGLRenderingContextBase::getWebGLVersion(context) >= 2, |
| 927 context.is3d() && | 924 context.is3d() && |
| 928 WebGLRenderingContextBase::getWebGLVersion(&context) >= | 925 WebGLRenderingContextBase::getWebGLVersion(&context) >= |
| 929 2); | 926 2); |
| 930 | 927 |
| 931 } // namespace blink | 928 } // namespace blink |
| 932 | 929 |
| 933 #endif | 930 #endif |
| OLD | NEW |