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 | 10 |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 bool checkAndTranslateAttachments(const char* functionName, GLenum, const Ve
ctor<GLenum>&, Vector<GLenum>&); | 217 bool checkAndTranslateAttachments(const char* functionName, GLenum, const Ve
ctor<GLenum>&, Vector<GLenum>&); |
218 | 218 |
219 /* WebGLRenderingContextBase overrides */ | 219 /* WebGLRenderingContextBase overrides */ |
220 unsigned getMaxWebGLLocationLength() const override { return 1024; }; | 220 unsigned getMaxWebGLLocationLength() const override { return 1024; }; |
221 bool validateCapability(const char* functionName, GLenum) override; | 221 bool validateCapability(const char* functionName, GLenum) override; |
222 bool validateBufferTarget(const char* functionName, GLenum target) override; | 222 bool validateBufferTarget(const char* functionName, GLenum target) override; |
223 bool validateAndUpdateBufferBindTarget(const char* functionName, GLenum, Web
GLBuffer*) override; | 223 bool validateAndUpdateBufferBindTarget(const char* functionName, GLenum, Web
GLBuffer*) override; |
224 WebGLTexture* validateTextureBinding(const char* functionName, GLenum target
, bool useSixEnumsForCubeMap) override; | 224 WebGLTexture* validateTextureBinding(const char* functionName, GLenum target
, bool useSixEnumsForCubeMap) override; |
225 bool validateFramebufferTarget(GLenum target) override; | 225 bool validateFramebufferTarget(GLenum target) override; |
226 bool validateReadPixelsFormatAndType(GLenum format, GLenum type) override; | 226 bool validateReadPixelsFormatAndType(GLenum format, GLenum type) override; |
227 bool validateVertexAttribPointerTypeAndSize(GLenum type, GLint size) overrid
e; | |
228 | 227 |
229 DOMArrayBufferView::ViewType readPixelsExpectedArrayBufferViewType(GLenum ty
pe) override; | 228 DOMArrayBufferView::ViewType readPixelsExpectedArrayBufferViewType(GLenum ty
pe) override; |
230 WebGLFramebuffer* getFramebufferBinding(GLenum target) override; | 229 WebGLFramebuffer* getFramebufferBinding(GLenum target) override; |
231 GLint getMaxTextureLevelForTarget(GLenum target) override; | 230 GLint getMaxTextureLevelForTarget(GLenum target) override; |
232 void renderbufferStorageImpl(GLenum target, GLsizei samples, GLenum internal
format, GLsizei width, GLsizei height, const char* functionName) override; | 231 void renderbufferStorageImpl(GLenum target, GLsizei samples, GLenum internal
format, GLsizei width, GLsizei height, const char* functionName) override; |
233 GLenum boundFramebufferColorFormat() override; | 232 GLenum boundFramebufferColorFormat() override; |
234 const WebGLSamplerState* getTextureUnitSamplerState(GLenum target, GLuint un
it) const override; | 233 const WebGLSamplerState* getTextureUnitSamplerState(GLenum target, GLuint un
it) const override; |
235 | 234 |
236 // Helper function to validate the target for compressedTex{Sub}Image3D. | 235 // Helper function to validate the target for compressedTex{Sub}Image3D. |
237 bool validateTexFunc3DTarget(const char* functionName, GLenum target); | 236 bool validateTexFunc3DTarget(const char* functionName, GLenum target); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 GLint m_unpackSkipImages; | 276 GLint m_unpackSkipImages; |
278 }; | 277 }; |
279 | 278 |
280 DEFINE_TYPE_CASTS(WebGL2RenderingContextBase, CanvasRenderingContext, context, | 279 DEFINE_TYPE_CASTS(WebGL2RenderingContextBase, CanvasRenderingContext, context, |
281 context->is3d() && WebGLRenderingContextBase::getWebGLVersion(context) >= 2, | 280 context->is3d() && WebGLRenderingContextBase::getWebGLVersion(context) >= 2, |
282 context.is3d() && WebGLRenderingContextBase::getWebGLVersion(&context) >= 2)
; | 281 context.is3d() && WebGLRenderingContextBase::getWebGLVersion(&context) >= 2)
; |
283 | 282 |
284 } // namespace blink | 283 } // namespace blink |
285 | 284 |
286 #endif | 285 #endif |
OLD | NEW |