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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 TexStorageType3D, | 188 TexStorageType3D, |
189 }; | 189 }; |
190 bool validateTexStorage(const char*, GLenum, GLsizei, GLenum, GLsizei, GLsiz
ei, GLsizei, TexStorageType); | 190 bool validateTexStorage(const char*, GLenum, GLsizei, GLenum, GLsizei, GLsiz
ei, GLsizei, TexStorageType); |
191 bool validateTexSubImage3D(const char*, GLenum target, GLint level, GLint xo
ffset, GLint yoffset, GLint zoffset, GLenum format, GLenum type, GLsizei width,
GLsizei height, GLsizei depth); | 191 bool validateTexSubImage3D(const char*, GLenum target, GLint level, GLint xo
ffset, GLint yoffset, GLint zoffset, GLenum format, GLenum type, GLsizei width,
GLsizei height, GLsizei depth); |
192 | 192 |
193 ScriptValue getInt64Parameter(ScriptState*, GLenum); | 193 ScriptValue getInt64Parameter(ScriptState*, GLenum); |
194 | 194 |
195 void texSubImage3DImpl(GLenum, GLint, GLint, GLint, GLint, GLenum, GLenum, I
mage*, WebGLImageConversion::ImageHtmlDomSource, bool, bool); | 195 void texSubImage3DImpl(GLenum, GLint, GLint, GLint, GLint, GLenum, GLenum, I
mage*, WebGLImageConversion::ImageHtmlDomSource, bool, bool); |
196 void samplerParameter(WebGLSampler*, GLenum, GLfloat, GLint, bool); | 196 void samplerParameter(WebGLSampler*, GLenum, GLfloat, GLint, bool); |
197 | 197 |
| 198 bool isBufferBoundToTransformFeedback(WebGLBuffer*); |
| 199 bool isBufferBoundToNonTransformFeedback(WebGLBuffer*); |
| 200 bool validateBufferTargetCompatibility(const char*, GLenum, WebGLBuffer*); |
| 201 |
| 202 bool validateBufferBaseTarget(const char* functionName, GLenum target); |
| 203 bool validateAndUpdateBufferBindBaseTarget(const char* functionName, GLenum,
GLuint, WebGLBuffer*); |
| 204 |
198 /* WebGLRenderingContextBase overrides */ | 205 /* WebGLRenderingContextBase overrides */ |
199 unsigned getMaxWebGLLocationLength() const override { return 1024; }; | 206 unsigned getMaxWebGLLocationLength() const override { return 1024; }; |
200 bool validateCapability(const char* functionName, GLenum) override; | 207 bool validateCapability(const char* functionName, GLenum) override; |
201 bool validateBufferTarget(const char* functionName, GLenum target) override; | 208 bool validateBufferTarget(const char* functionName, GLenum target) override; |
202 bool validateAndUpdateBufferBindTarget(const char* functionName, GLenum, Web
GLBuffer*) override; | 209 bool validateAndUpdateBufferBindTarget(const char* functionName, GLenum, Web
GLBuffer*) override; |
203 WebGLTexture* validateTextureBinding(const char* functionName, GLenum target
, bool useSixEnumsForCubeMap) override; | 210 WebGLTexture* validateTextureBinding(const char* functionName, GLenum target
, bool useSixEnumsForCubeMap) override; |
204 bool validateFramebufferTarget(GLenum target) override; | 211 bool validateFramebufferTarget(GLenum target) override; |
205 bool validateReadPixelsFormatAndType(GLenum format, GLenum type) override; | 212 bool validateReadPixelsFormatAndType(GLenum format, GLenum type) override; |
206 DOMArrayBufferView::ViewType readPixelsExpectedArrayBufferViewType(GLenum ty
pe) override; | 213 DOMArrayBufferView::ViewType readPixelsExpectedArrayBufferViewType(GLenum ty
pe) override; |
207 WebGLFramebuffer* getFramebufferBinding(GLenum target) override; | 214 WebGLFramebuffer* getFramebufferBinding(GLenum target) override; |
(...skipping 11 matching lines...) Expand all Loading... |
219 GLint m_max3DTextureSize; | 226 GLint m_max3DTextureSize; |
220 GLint m_max3DTextureLevel; | 227 GLint m_max3DTextureLevel; |
221 | 228 |
222 PersistentWillBeMember<WebGLBuffer> m_boundCopyReadBuffer; | 229 PersistentWillBeMember<WebGLBuffer> m_boundCopyReadBuffer; |
223 PersistentWillBeMember<WebGLBuffer> m_boundCopyWriteBuffer; | 230 PersistentWillBeMember<WebGLBuffer> m_boundCopyWriteBuffer; |
224 PersistentWillBeMember<WebGLBuffer> m_boundPixelPackBuffer; | 231 PersistentWillBeMember<WebGLBuffer> m_boundPixelPackBuffer; |
225 PersistentWillBeMember<WebGLBuffer> m_boundPixelUnpackBuffer; | 232 PersistentWillBeMember<WebGLBuffer> m_boundPixelUnpackBuffer; |
226 PersistentWillBeMember<WebGLBuffer> m_boundTransformFeedbackBuffer; | 233 PersistentWillBeMember<WebGLBuffer> m_boundTransformFeedbackBuffer; |
227 PersistentWillBeMember<WebGLBuffer> m_boundUniformBuffer; | 234 PersistentWillBeMember<WebGLBuffer> m_boundUniformBuffer; |
228 | 235 |
| 236 PersistentHeapVectorWillBeHeapVector<Member<WebGLBuffer>> m_boundIndexedTran
sformFeedbackBuffers; |
| 237 PersistentHeapVectorWillBeHeapVector<Member<WebGLBuffer>> m_boundIndexedUnif
ormBuffers; |
| 238 size_t m_maxBoundUniformBufferIndex; |
| 239 |
229 PersistentWillBeMember<WebGLQuery> m_currentBooleanOcclusionQuery; | 240 PersistentWillBeMember<WebGLQuery> m_currentBooleanOcclusionQuery; |
230 PersistentWillBeMember<WebGLQuery> m_currentTransformFeedbackPrimitivesWritt
enQuery; | 241 PersistentWillBeMember<WebGLQuery> m_currentTransformFeedbackPrimitivesWritt
enQuery; |
231 PersistentHeapVectorWillBeHeapVector<Member<WebGLSampler>> m_samplerUnits; | 242 PersistentHeapVectorWillBeHeapVector<Member<WebGLSampler>> m_samplerUnits; |
232 }; | 243 }; |
233 | 244 |
234 DEFINE_TYPE_CASTS(WebGL2RenderingContextBase, CanvasRenderingContext, context, | 245 DEFINE_TYPE_CASTS(WebGL2RenderingContextBase, CanvasRenderingContext, context, |
235 context->is3d() && WebGLRenderingContextBase::getWebGLVersion(context) >= 2, | 246 context->is3d() && WebGLRenderingContextBase::getWebGLVersion(context) >= 2, |
236 context.is3d() && WebGLRenderingContextBase::getWebGLVersion(&context) >= 2)
; | 247 context.is3d() && WebGLRenderingContextBase::getWebGLVersion(&context) >= 2)
; |
237 | 248 |
238 } // namespace blink | 249 } // namespace blink |
239 | 250 |
240 #endif | 251 #endif |
OLD | NEW |