| 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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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; | 227 bool validateVertexAttribPointerTypeAndSize(GLenum type, GLint size) overrid
e; |
| 228 | 228 |
| 229 DOMArrayBufferView::ViewType readPixelsExpectedArrayBufferViewType(GLenum ty
pe) override; | 229 DOMArrayBufferView::ViewType readPixelsExpectedArrayBufferViewType(GLenum ty
pe) override; |
| 230 WebGLFramebuffer* getFramebufferBinding(GLenum target) override; | 230 WebGLFramebuffer* getFramebufferBinding(GLenum target) override; |
| 231 GLint getMaxTextureLevelForTarget(GLenum target) override; | 231 GLint getMaxTextureLevelForTarget(GLenum target) override; |
| 232 void renderbufferStorageImpl(GLenum target, GLsizei samples, GLenum internal
format, GLsizei width, GLsizei height, const char* functionName) override; | 232 void renderbufferStorageImpl(GLenum target, GLsizei samples, GLenum internal
format, GLsizei width, GLsizei height, const char* functionName) override; |
| 233 GLenum boundFramebufferColorFormat() override; | 233 GLenum boundFramebufferColorFormat() override; |
| 234 const WebGLSamplerState* getTextureUnitSamplerState(GLenum target, GLuint un
it) const override; | 234 const WebGLSamplerState* getTextureUnitSamplerState(GLenum target, GLuint un
it) const override; |
| 235 unsigned sizeInBytes(GLenum type, bool isIntegerAPI) const override; |
| 235 | 236 |
| 236 // Helper function to validate the target for compressedTex{Sub}Image3D. | 237 // Helper function to validate the target for compressedTex{Sub}Image3D. |
| 237 bool validateTexFunc3DTarget(const char* functionName, GLenum target); | 238 bool validateTexFunc3DTarget(const char* functionName, GLenum target); |
| 238 | 239 |
| 239 WebGLBuffer* validateBufferDataTarget(const char* functionName, GLenum targe
t) override; | 240 WebGLBuffer* validateBufferDataTarget(const char* functionName, GLenum targe
t) override; |
| 240 bool validateBufferDataUsage(const char* functionName, GLenum usage) overrid
e; | 241 bool validateBufferDataUsage(const char* functionName, GLenum usage) overrid
e; |
| 241 | 242 |
| 242 void removeBoundBuffer(WebGLBuffer*) override; | 243 void removeBoundBuffer(WebGLBuffer*) override; |
| 243 | 244 |
| 244 void resetUnpackParameters() override; | 245 void resetUnpackParameters() override; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 GLint m_unpackSkipImages; | 278 GLint m_unpackSkipImages; |
| 278 }; | 279 }; |
| 279 | 280 |
| 280 DEFINE_TYPE_CASTS(WebGL2RenderingContextBase, CanvasRenderingContext, context, | 281 DEFINE_TYPE_CASTS(WebGL2RenderingContextBase, CanvasRenderingContext, context, |
| 281 context->is3d() && WebGLRenderingContextBase::getWebGLVersion(context) >= 2, | 282 context->is3d() && WebGLRenderingContextBase::getWebGLVersion(context) >= 2, |
| 282 context.is3d() && WebGLRenderingContextBase::getWebGLVersion(&context) >= 2)
; | 283 context.is3d() && WebGLRenderingContextBase::getWebGLVersion(&context) >= 2)
; |
| 283 | 284 |
| 284 } // namespace blink | 285 } // namespace blink |
| 285 | 286 |
| 286 #endif | 287 #endif |
| OLD | NEW |