| 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 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 enum TexStorageType { | 228 enum TexStorageType { |
| 229 TexStorageType2D, | 229 TexStorageType2D, |
| 230 TexStorageType3D, | 230 TexStorageType3D, |
| 231 }; | 231 }; |
| 232 bool validateTexStorage(const char*, GLenum, GLsizei, GLenum, GLsizei, GLsiz
ei, GLsizei, TexStorageType); | 232 bool validateTexStorage(const char*, GLenum, GLsizei, GLenum, GLsizei, GLsiz
ei, GLsizei, TexStorageType); |
| 233 | 233 |
| 234 bool validateUniformBlockIndex(const char*, WebGLProgram*, GLuint); | 234 bool validateUniformBlockIndex(const char*, WebGLProgram*, GLuint); |
| 235 | 235 |
| 236 ScriptValue getInt64Parameter(ScriptState*, GLenum); | 236 ScriptValue getInt64Parameter(ScriptState*, GLenum); |
| 237 | 237 |
| 238 void texSubImage3DImpl(GLenum, GLint, GLint, GLint, GLint, GLenum, GLenum, I
mage*, WebGLImageConversion::ImageHtmlDomSource, bool, bool); | |
| 239 void samplerParameter(WebGLSampler*, GLenum, GLfloat, GLint, bool); | 238 void samplerParameter(WebGLSampler*, GLenum, GLfloat, GLint, bool); |
| 240 | 239 |
| 241 bool isBufferBoundToTransformFeedback(WebGLBuffer*); | 240 bool isBufferBoundToTransformFeedback(WebGLBuffer*); |
| 242 bool isBufferBoundToNonTransformFeedback(WebGLBuffer*); | 241 bool isBufferBoundToNonTransformFeedback(WebGLBuffer*); |
| 243 bool validateBufferTargetCompatibility(const char*, GLenum, WebGLBuffer*); | 242 bool validateBufferTargetCompatibility(const char*, GLenum, WebGLBuffer*); |
| 244 | 243 |
| 245 bool validateBufferBaseTarget(const char* functionName, GLenum target); | 244 bool validateBufferBaseTarget(const char* functionName, GLenum target); |
| 246 bool validateAndUpdateBufferBindBaseTarget(const char* functionName, GLenum,
GLuint, WebGLBuffer*); | 245 bool validateAndUpdateBufferBindBaseTarget(const char* functionName, GLenum,
GLuint, WebGLBuffer*); |
| 247 | 246 |
| 248 WebGLImageConversion::PixelStoreParams getPackPixelStoreParams() override; | 247 WebGLImageConversion::PixelStoreParams getPackPixelStoreParams() override; |
| 249 WebGLImageConversion::PixelStoreParams getUnpackPixelStoreParams(TexImageDim
ension) override; | 248 WebGLImageConversion::PixelStoreParams getUnpackPixelStoreParams(TexImageDim
ension) override; |
| 250 | 249 |
| 251 bool checkAndTranslateAttachments(const char* functionName, GLenum, Vector<G
Lenum>&); | 250 bool checkAndTranslateAttachments(const char* functionName, GLenum, Vector<G
Lenum>&); |
| 252 | 251 |
| 253 /* WebGLRenderingContextBase overrides */ | 252 /* WebGLRenderingContextBase overrides */ |
| 254 unsigned getMaxWebGLLocationLength() const override { return 1024; }; | 253 unsigned getMaxWebGLLocationLength() const override { return 1024; }; |
| 255 bool validateCapability(const char* functionName, GLenum) override; | 254 bool validateCapability(const char* functionName, GLenum) override; |
| 256 bool validateBufferTarget(const char* functionName, GLenum target) override; | 255 bool validateBufferTarget(const char* functionName, GLenum target) override; |
| 257 bool validateAndUpdateBufferBindTarget(const char* functionName, GLenum, Web
GLBuffer*) override; | 256 bool validateAndUpdateBufferBindTarget(const char* functionName, GLenum, Web
GLBuffer*) override; |
| 258 bool validateFramebufferTarget(GLenum target) override; | 257 bool validateFramebufferTarget(GLenum target) override; |
| 259 | 258 |
| 260 bool validateReadPixelsFormatAndType(GLenum format, GLenum type, DOMArrayBuf
ferView*) override; | 259 bool validateReadPixelsFormatAndType(GLenum format, GLenum type, DOMArrayBuf
ferView*) override; |
| 261 WebGLFramebuffer* getFramebufferBinding(GLenum target) override; | 260 WebGLFramebuffer* getFramebufferBinding(GLenum target) override; |
| 262 WebGLFramebuffer* getReadFramebufferBinding() override; | 261 WebGLFramebuffer* getReadFramebufferBinding() override; |
| 263 GLint getMaxTextureLevelForTarget(GLenum target) override; | 262 GLint getMaxTextureLevelForTarget(GLenum target) override; |
| 264 void renderbufferStorageImpl(GLenum target, GLsizei samples, GLenum internal
format, GLsizei width, GLsizei height, const char* functionName) override; | 263 void renderbufferStorageImpl(GLenum target, GLsizei samples, GLenum internal
format, GLsizei width, GLsizei height, const char* functionName) override; |
| 265 | 264 |
| 265 WebGLTexture* validateTexImageBinding(const char*, TexImageFunctionID, GLenu
m) override; |
| 266 // Helper function to check texture 3D target and texture bound to the targe
t. | 266 // Helper function to check texture 3D target and texture bound to the targe
t. |
| 267 // Generate GL errors and return 0 if target is invalid or texture bound is | 267 // Generate GL errors and return 0 if target is invalid or texture bound is |
| 268 // null. Otherwise, return the texture bound to the target. | 268 // null. Otherwise, return the texture bound to the target. |
| 269 WebGLTexture* validateTexture3DBinding(const char* functionName, GLenum targ
et); | 269 WebGLTexture* validateTexture3DBinding(const char* functionName, GLenum targ
et); |
| 270 | 270 |
| 271 WebGLBuffer* validateBufferDataTarget(const char* functionName, GLenum targe
t) override; | 271 WebGLBuffer* validateBufferDataTarget(const char* functionName, GLenum targe
t) override; |
| 272 bool validateBufferDataUsage(const char* functionName, GLenum usage) overrid
e; | 272 bool validateBufferDataUsage(const char* functionName, GLenum usage) overrid
e; |
| 273 | 273 |
| 274 bool canUseTexImageCanvasByGPU(GLint internalformat, GLenum type) override; | 274 bool canUseTexImageCanvasByGPU(GLint internalformat, GLenum type) override; |
| 275 | 275 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 ScopedPersistent<v8::Array> m_queryWrappers; | 318 ScopedPersistent<v8::Array> m_queryWrappers; |
| 319 }; | 319 }; |
| 320 | 320 |
| 321 DEFINE_TYPE_CASTS(WebGL2RenderingContextBase, CanvasRenderingContext, context, | 321 DEFINE_TYPE_CASTS(WebGL2RenderingContextBase, CanvasRenderingContext, context, |
| 322 context->is3d() && WebGLRenderingContextBase::getWebGLVersion(context) >= 2, | 322 context->is3d() && WebGLRenderingContextBase::getWebGLVersion(context) >= 2, |
| 323 context.is3d() && WebGLRenderingContextBase::getWebGLVersion(&context) >= 2)
; | 323 context.is3d() && WebGLRenderingContextBase::getWebGLVersion(&context) >= 2)
; |
| 324 | 324 |
| 325 } // namespace blink | 325 } // namespace blink |
| 326 | 326 |
| 327 #endif | 327 #endif |
| OLD | NEW |