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 14 matching lines...) Expand all Loading... |
25 class WebGL2RenderingContextBase : public WebGLRenderingContextBase { | 25 class WebGL2RenderingContextBase : public WebGLRenderingContextBase { |
26 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(WebGL2RenderingContextBase); | 26 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(WebGL2RenderingContextBase); |
27 public: | 27 public: |
28 ~WebGL2RenderingContextBase() override; | 28 ~WebGL2RenderingContextBase() override; |
29 | 29 |
30 /* Buffer objects */ | 30 /* Buffer objects */ |
31 void copyBufferSubData(GLenum, GLenum, long long, long long, long long); | 31 void copyBufferSubData(GLenum, GLenum, long long, long long, long long); |
32 void getBufferSubData(GLenum target, long long offset, DOMArrayBuffer* retur
nedData); | 32 void getBufferSubData(GLenum target, long long offset, DOMArrayBuffer* retur
nedData); |
33 | 33 |
34 /* Framebuffer objects */ | 34 /* Framebuffer objects */ |
| 35 bool validateTexFuncLayer(const char*, GLenum texTarget, GLint layer); |
35 void blitFramebuffer(GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint,
GLbitfield, GLenum); | 36 void blitFramebuffer(GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint,
GLbitfield, GLenum); |
36 void framebufferTextureLayer(GLenum, GLenum, const WebGLTexture*, GLint, GLi
nt); | 37 void framebufferTextureLayer(ScriptState*, GLenum, GLenum, WebGLTexture*, GL
int, GLint); |
37 ScriptValue getInternalformatParameter(ScriptState*, GLenum, GLenum, GLenum)
; | 38 ScriptValue getInternalformatParameter(ScriptState*, GLenum, GLenum, GLenum)
; |
38 void invalidateFramebuffer(GLenum, Vector<GLenum>&); | 39 void invalidateFramebuffer(GLenum, Vector<GLenum>&); |
39 void invalidateSubFramebuffer(GLenum, Vector<GLenum>&, GLint, GLint, GLsizei
, GLsizei); | 40 void invalidateSubFramebuffer(GLenum, Vector<GLenum>&, GLint, GLint, GLsizei
, GLsizei); |
40 void readBuffer(GLenum); | 41 void readBuffer(GLenum); |
41 | 42 |
42 /* Renderbuffer objects */ | 43 /* Renderbuffer objects */ |
43 void renderbufferStorageMultisample(GLenum, GLsizei, GLenum, GLsizei, GLsize
i); | 44 void renderbufferStorageMultisample(GLenum, GLsizei, GLenum, GLsizei, GLsize
i); |
44 | 45 |
45 /* Texture objects */ | 46 /* Texture objects */ |
46 void texStorage2D(GLenum, GLsizei, GLenum, GLsizei, GLsizei); | 47 void texStorage2D(GLenum, GLsizei, GLenum, GLsizei, GLsizei); |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 | 229 |
229 WebGLBuffer* validateBufferDataTarget(const char* functionName, GLenum targe
t) override; | 230 WebGLBuffer* validateBufferDataTarget(const char* functionName, GLenum targe
t) override; |
230 bool validateBufferDataUsage(const char* functionName, GLenum usage) overrid
e; | 231 bool validateBufferDataUsage(const char* functionName, GLenum usage) overrid
e; |
231 | 232 |
232 void removeBoundBuffer(WebGLBuffer*) override; | 233 void removeBoundBuffer(WebGLBuffer*) override; |
233 | 234 |
234 PersistentWillBeMember<WebGLFramebuffer> m_readFramebufferBinding; | 235 PersistentWillBeMember<WebGLFramebuffer> m_readFramebufferBinding; |
235 PersistentWillBeMember<WebGLTransformFeedback> m_transformFeedbackBinding; | 236 PersistentWillBeMember<WebGLTransformFeedback> m_transformFeedbackBinding; |
236 GLint m_max3DTextureSize; | 237 GLint m_max3DTextureSize; |
237 GLint m_max3DTextureLevel; | 238 GLint m_max3DTextureLevel; |
| 239 GLint m_maxArrayTextureLayers; |
238 | 240 |
239 std::set<GLenum> m_supportedInternalFormatsStorage; | 241 std::set<GLenum> m_supportedInternalFormatsStorage; |
240 | 242 |
241 PersistentWillBeMember<WebGLBuffer> m_boundCopyReadBuffer; | 243 PersistentWillBeMember<WebGLBuffer> m_boundCopyReadBuffer; |
242 PersistentWillBeMember<WebGLBuffer> m_boundCopyWriteBuffer; | 244 PersistentWillBeMember<WebGLBuffer> m_boundCopyWriteBuffer; |
243 PersistentWillBeMember<WebGLBuffer> m_boundPixelPackBuffer; | 245 PersistentWillBeMember<WebGLBuffer> m_boundPixelPackBuffer; |
244 PersistentWillBeMember<WebGLBuffer> m_boundPixelUnpackBuffer; | 246 PersistentWillBeMember<WebGLBuffer> m_boundPixelUnpackBuffer; |
245 PersistentWillBeMember<WebGLBuffer> m_boundTransformFeedbackBuffer; | 247 PersistentWillBeMember<WebGLBuffer> m_boundTransformFeedbackBuffer; |
246 PersistentWillBeMember<WebGLBuffer> m_boundUniformBuffer; | 248 PersistentWillBeMember<WebGLBuffer> m_boundUniformBuffer; |
247 | 249 |
248 PersistentHeapVectorWillBeHeapVector<Member<WebGLBuffer>> m_boundIndexedTran
sformFeedbackBuffers; | 250 PersistentHeapVectorWillBeHeapVector<Member<WebGLBuffer>> m_boundIndexedTran
sformFeedbackBuffers; |
249 PersistentHeapVectorWillBeHeapVector<Member<WebGLBuffer>> m_boundIndexedUnif
ormBuffers; | 251 PersistentHeapVectorWillBeHeapVector<Member<WebGLBuffer>> m_boundIndexedUnif
ormBuffers; |
250 size_t m_maxBoundUniformBufferIndex; | 252 size_t m_maxBoundUniformBufferIndex; |
251 | 253 |
252 PersistentWillBeMember<WebGLQuery> m_currentBooleanOcclusionQuery; | 254 PersistentWillBeMember<WebGLQuery> m_currentBooleanOcclusionQuery; |
253 PersistentWillBeMember<WebGLQuery> m_currentTransformFeedbackPrimitivesWritt
enQuery; | 255 PersistentWillBeMember<WebGLQuery> m_currentTransformFeedbackPrimitivesWritt
enQuery; |
254 PersistentHeapVectorWillBeHeapVector<Member<WebGLSampler>> m_samplerUnits; | 256 PersistentHeapVectorWillBeHeapVector<Member<WebGLSampler>> m_samplerUnits; |
255 }; | 257 }; |
256 | 258 |
257 DEFINE_TYPE_CASTS(WebGL2RenderingContextBase, CanvasRenderingContext, context, | 259 DEFINE_TYPE_CASTS(WebGL2RenderingContextBase, CanvasRenderingContext, context, |
258 context->is3d() && WebGLRenderingContextBase::getWebGLVersion(context) >= 2, | 260 context->is3d() && WebGLRenderingContextBase::getWebGLVersion(context) >= 2, |
259 context.is3d() && WebGLRenderingContextBase::getWebGLVersion(&context) >= 2)
; | 261 context.is3d() && WebGLRenderingContextBase::getWebGLVersion(&context) >= 2)
; |
260 | 262 |
261 } // namespace blink | 263 } // namespace blink |
262 | 264 |
263 #endif | 265 #endif |
OLD | NEW |