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 "core/html/canvas/WebGLExtension.h" | 8 #include "core/html/canvas/WebGLExtension.h" |
9 #include "core/html/canvas/WebGLRenderingContextBase.h" | 9 #include "core/html/canvas/WebGLRenderingContextBase.h" |
10 #include "wtf/PassRefPtr.h" | 10 #include "wtf/PassRefPtr.h" |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 /* Vertex Array Objects */ | 156 /* Vertex Array Objects */ |
157 PassRefPtrWillBeRawPtr<WebGLVertexArrayObjectOES> createVertexArray(); | 157 PassRefPtrWillBeRawPtr<WebGLVertexArrayObjectOES> createVertexArray(); |
158 void deleteVertexArray(WebGLVertexArrayObjectOES*); | 158 void deleteVertexArray(WebGLVertexArrayObjectOES*); |
159 GLboolean isVertexArray(WebGLVertexArrayObjectOES*); | 159 GLboolean isVertexArray(WebGLVertexArrayObjectOES*); |
160 void bindVertexArray(WebGLVertexArrayObjectOES*); | 160 void bindVertexArray(WebGLVertexArrayObjectOES*); |
161 | 161 |
162 /* WebGLRenderingContextBase overrides */ | 162 /* WebGLRenderingContextBase overrides */ |
163 void initializeNewContext() override; | 163 void initializeNewContext() override; |
164 void bindFramebuffer(GLenum target, WebGLFramebuffer*) override; | 164 void bindFramebuffer(GLenum target, WebGLFramebuffer*) override; |
165 ScriptValue getParameter(ScriptState*, GLenum pname) override; | 165 ScriptValue getParameter(ScriptState*, GLenum pname) override; |
| 166 ScriptValue getTexParameter(ScriptState*, GLenum target, GLenum pname) overr
ide; |
166 | 167 |
167 DECLARE_VIRTUAL_TRACE(); | 168 DECLARE_VIRTUAL_TRACE(); |
168 | 169 |
169 protected: | 170 protected: |
170 WebGL2RenderingContextBase(HTMLCanvasElement*, PassOwnPtr<blink::WebGraphics
Context3D>, const WebGLContextAttributes& requestedAttributes); | 171 WebGL2RenderingContextBase(HTMLCanvasElement*, PassOwnPtr<blink::WebGraphics
Context3D>, const WebGLContextAttributes& requestedAttributes); |
171 | 172 |
172 bool validateClearBuffer(const char* functionName, GLenum buffer, GLsizei le
ngth); | 173 bool validateClearBuffer(const char* functionName, GLenum buffer, GLsizei le
ngth); |
173 | 174 |
174 ScriptValue getInt64Parameter(ScriptState*, GLenum); | 175 ScriptValue getInt64Parameter(ScriptState*, GLenum); |
175 | 176 |
176 /* WebGLRenderingContextBase overrides */ | 177 /* WebGLRenderingContextBase overrides */ |
177 bool validateCapability(const char* functionName, GLenum) override; | 178 bool validateCapability(const char* functionName, GLenum) override; |
178 bool validateBufferTarget(const char* functionName, GLenum target) override; | 179 bool validateBufferTarget(const char* functionName, GLenum target) override; |
179 bool validateAndUpdateBufferBindTarget(const char* functionName, GLenum, Web
GLBuffer*) override; | 180 bool validateAndUpdateBufferBindTarget(const char* functionName, GLenum, Web
GLBuffer*) override; |
| 181 WebGLTexture* validateTextureBinding(const char* functionName, GLenum target
, bool useSixEnumsForCubeMap) override; |
180 | 182 |
181 RefPtrWillBeMember<WebGLFramebuffer> m_readFramebufferBinding; | 183 RefPtrWillBeMember<WebGLFramebuffer> m_readFramebufferBinding; |
182 }; | 184 }; |
183 | 185 |
184 DEFINE_TYPE_CASTS(WebGL2RenderingContextBase, CanvasRenderingContext, context, | 186 DEFINE_TYPE_CASTS(WebGL2RenderingContextBase, CanvasRenderingContext, context, |
185 context->is3d() && WebGLRenderingContextBase::getWebGLVersion(context) >= 2, | 187 context->is3d() && WebGLRenderingContextBase::getWebGLVersion(context) >= 2, |
186 context.is3d() && WebGLRenderingContextBase::getWebGLVersion(&context) >= 2)
; | 188 context.is3d() && WebGLRenderingContextBase::getWebGLVersion(&context) >= 2)
; |
187 | 189 |
188 } // namespace blink | 190 } // namespace blink |
189 | 191 |
190 #endif | 192 #endif |
OLD | NEW |