| 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 "modules/webgl/WebGLExtension.h" | 8 #include "modules/webgl/WebGLExtension.h" |
| 9 #include "modules/webgl/WebGLRenderingContextBase.h" | 9 #include "modules/webgl/WebGLRenderingContextBase.h" |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 class WebGLUniformLocation; | 23 class WebGLUniformLocation; |
| 24 class WebGLVertexArrayObject; | 24 class WebGLVertexArrayObject; |
| 25 | 25 |
| 26 class WebGL2RenderingContextBase : public WebGLRenderingContextBase { | 26 class WebGL2RenderingContextBase : public WebGLRenderingContextBase { |
| 27 public: | 27 public: |
| 28 ~WebGL2RenderingContextBase() override; | 28 ~WebGL2RenderingContextBase() override; |
| 29 | 29 |
| 30 /* Buffer objects */ | 30 /* Buffer objects */ |
| 31 void bufferData(GLenum, DOMArrayBufferView*, GLenum, GLuint, GLuint); | 31 void bufferData(GLenum, DOMArrayBufferView*, GLenum, GLuint, GLuint); |
| 32 void bufferSubData(GLenum, GLintptr, DOMArrayBufferView*, GLuint, GLuint); | 32 void bufferSubData(GLenum, GLintptr, DOMArrayBufferView*, GLuint, GLuint); |
| 33 // Have to re-declare/re-define the following buffer{Sub}Data functions from b
ase class. | 33 // Have to re-declare/re-define the following buffer{Sub}Data functions from |
| 34 // This is because the above buffer{Sub}Data() hides the name from base class. | 34 // base class. This is because the above buffer{Sub}Data() hides the name |
| 35 // from base class. |
| 35 void bufferData(GLenum target, long long size, GLenum usage); | 36 void bufferData(GLenum target, long long size, GLenum usage); |
| 36 void bufferData(GLenum target, DOMArrayBuffer* data, GLenum usage); | 37 void bufferData(GLenum target, DOMArrayBuffer* data, GLenum usage); |
| 37 void bufferData(GLenum target, DOMArrayBufferView* data, GLenum usage); | 38 void bufferData(GLenum target, DOMArrayBufferView* data, GLenum usage); |
| 38 void bufferSubData(GLenum target, long long offset, DOMArrayBuffer* data); | 39 void bufferSubData(GLenum target, long long offset, DOMArrayBuffer* data); |
| 39 void bufferSubData(GLenum target, | 40 void bufferSubData(GLenum target, |
| 40 long long offset, | 41 long long offset, |
| 41 const FlexibleArrayBufferView& data); | 42 const FlexibleArrayBufferView& data); |
| 42 | 43 |
| 43 void copyBufferSubData(GLenum, GLenum, long long, long long, long long); | 44 void copyBufferSubData(GLenum, GLenum, long long, long long, long long); |
| 44 void getBufferSubData(GLenum, long long, DOMArrayBufferView*, GLuint, GLuint); | 45 void getBufferSubData(GLenum, long long, DOMArrayBufferView*, GLuint, GLuint); |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 GLint, | 206 GLint, |
| 206 GLint, | 207 GLint, |
| 207 GLint, | 208 GLint, |
| 208 GLsizei, | 209 GLsizei, |
| 209 GLsizei, | 210 GLsizei, |
| 210 GLenum, | 211 GLenum, |
| 211 GLenum, | 212 GLenum, |
| 212 DOMArrayBufferView*, | 213 DOMArrayBufferView*, |
| 213 GLuint); | 214 GLuint); |
| 214 | 215 |
| 215 // Have to re-declare/re-define the following tex{Sub}Image2D functions from b
ase class. | 216 // Have to re-declare/re-define the following tex{Sub}Image2D functions from |
| 216 // This is because the above tex{Sub}Image2D() hides the name from base class. | 217 // base class. This is because the above tex{Sub}Image2D() hides the name |
| 218 // from base class. |
| 217 void texImage2D(GLenum, GLint, GLint, GLenum, GLenum, ImageData*); | 219 void texImage2D(GLenum, GLint, GLint, GLenum, GLenum, ImageData*); |
| 218 void texImage2D(GLenum, | 220 void texImage2D(GLenum, |
| 219 GLint, | 221 GLint, |
| 220 GLint, | 222 GLint, |
| 221 GLenum, | 223 GLenum, |
| 222 GLenum, | 224 GLenum, |
| 223 HTMLImageElement*, | 225 HTMLImageElement*, |
| 224 ExceptionState&); | 226 ExceptionState&); |
| 225 void texImage2D(GLenum, | 227 void texImage2D(GLenum, |
| 226 GLint, | 228 GLint, |
| (...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 718 DECLARE_VIRTUAL_TRACE(); | 720 DECLARE_VIRTUAL_TRACE(); |
| 719 | 721 |
| 720 protected: | 722 protected: |
| 721 friend class V8WebGL2RenderingContext; | 723 friend class V8WebGL2RenderingContext; |
| 722 | 724 |
| 723 WebGL2RenderingContextBase( | 725 WebGL2RenderingContextBase( |
| 724 HTMLCanvasElement*, | 726 HTMLCanvasElement*, |
| 725 std::unique_ptr<WebGraphicsContext3DProvider>, | 727 std::unique_ptr<WebGraphicsContext3DProvider>, |
| 726 const CanvasContextCreationAttributes& requestedAttributes); | 728 const CanvasContextCreationAttributes& requestedAttributes); |
| 727 | 729 |
| 728 // Helper function to validate target and the attachment combination for getFr
amebufferAttachmentParameters. | 730 // Helper function to validate target and the attachment combination for |
| 729 // Generate GL error and return false if parameters are illegal. | 731 // getFramebufferAttachmentParameters. Generate GL error and return false if |
| 732 // parameters are illegal. |
| 730 bool validateGetFramebufferAttachmentParameterFunc(const char* functionName, | 733 bool validateGetFramebufferAttachmentParameterFunc(const char* functionName, |
| 731 GLenum target, | 734 GLenum target, |
| 732 GLenum attachment); | 735 GLenum attachment); |
| 733 | 736 |
| 734 bool validateClearBuffer(const char* functionName, | 737 bool validateClearBuffer(const char* functionName, |
| 735 GLenum buffer, | 738 GLenum buffer, |
| 736 GLsizei length); | 739 GLsizei length); |
| 737 | 740 |
| 738 enum TexStorageType { | 741 enum TexStorageType { |
| 739 TexStorageType2D, | 742 TexStorageType2D, |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 863 context, | 866 context, |
| 864 context->is3d() && | 867 context->is3d() && |
| 865 WebGLRenderingContextBase::getWebGLVersion(context) >= 2, | 868 WebGLRenderingContextBase::getWebGLVersion(context) >= 2, |
| 866 context.is3d() && | 869 context.is3d() && |
| 867 WebGLRenderingContextBase::getWebGLVersion(&context) >= | 870 WebGLRenderingContextBase::getWebGLVersion(&context) >= |
| 868 2); | 871 2); |
| 869 | 872 |
| 870 } // namespace blink | 873 } // namespace blink |
| 871 | 874 |
| 872 #endif | 875 #endif |
| OLD | NEW |