| 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 #include <memory> |
| 10 | 11 |
| 11 namespace blink { | 12 namespace blink { |
| 12 | 13 |
| 13 class WebGLTexture; | 14 class WebGLTexture; |
| 14 | 15 |
| 15 class WebGLActiveInfo; | 16 class WebGLActiveInfo; |
| 16 class WebGLBuffer; | 17 class WebGLBuffer; |
| 17 class WebGLProgram; | 18 class WebGLProgram; |
| 18 class WebGLQuery; | 19 class WebGLQuery; |
| 19 class WebGLSampler; | 20 class WebGLSampler; |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 ScriptValue getTexParameter(ScriptState*, GLenum target, GLenum pname) overr
ide; | 211 ScriptValue getTexParameter(ScriptState*, GLenum target, GLenum pname) overr
ide; |
| 211 ScriptValue getFramebufferAttachmentParameter(ScriptState*, GLenum target, G
Lenum attachment, GLenum pname) override; | 212 ScriptValue getFramebufferAttachmentParameter(ScriptState*, GLenum target, G
Lenum attachment, GLenum pname) override; |
| 212 void pixelStorei(GLenum pname, GLint param) override; | 213 void pixelStorei(GLenum pname, GLint param) override; |
| 213 void readPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum form
at, GLenum type, DOMArrayBufferView* pixels) override; | 214 void readPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum form
at, GLenum type, DOMArrayBufferView* pixels) override; |
| 214 void restoreCurrentFramebuffer() override; | 215 void restoreCurrentFramebuffer() override; |
| 215 | 216 |
| 216 EAGERLY_FINALIZE(); | 217 EAGERLY_FINALIZE(); |
| 217 DECLARE_VIRTUAL_TRACE(); | 218 DECLARE_VIRTUAL_TRACE(); |
| 218 | 219 |
| 219 protected: | 220 protected: |
| 220 WebGL2RenderingContextBase(HTMLCanvasElement*, PassOwnPtr<WebGraphicsContext
3DProvider>, const WebGLContextAttributes& requestedAttributes); | 221 WebGL2RenderingContextBase(HTMLCanvasElement*, std::unique_ptr<WebGraphicsCo
ntext3DProvider>, const WebGLContextAttributes& requestedAttributes); |
| 221 | 222 |
| 222 // Helper function to validate target and the attachment combination for get
FramebufferAttachmentParameters. | 223 // Helper function to validate target and the attachment combination for get
FramebufferAttachmentParameters. |
| 223 // Generate GL error and return false if parameters are illegal. | 224 // Generate GL error and return false if parameters are illegal. |
| 224 bool validateGetFramebufferAttachmentParameterFunc(const char* functionName,
GLenum target, GLenum attachment); | 225 bool validateGetFramebufferAttachmentParameterFunc(const char* functionName,
GLenum target, GLenum attachment); |
| 225 | 226 |
| 226 bool validateClearBuffer(const char* functionName, GLenum buffer, GLsizei le
ngth); | 227 bool validateClearBuffer(const char* functionName, GLenum buffer, GLsizei le
ngth); |
| 227 | 228 |
| 228 enum TexStorageType { | 229 enum TexStorageType { |
| 229 TexStorageType2D, | 230 TexStorageType2D, |
| 230 TexStorageType3D, | 231 TexStorageType3D, |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 ScopedPersistent<v8::Array> m_queryWrappers; | 319 ScopedPersistent<v8::Array> m_queryWrappers; |
| 319 }; | 320 }; |
| 320 | 321 |
| 321 DEFINE_TYPE_CASTS(WebGL2RenderingContextBase, CanvasRenderingContext, context, | 322 DEFINE_TYPE_CASTS(WebGL2RenderingContextBase, CanvasRenderingContext, context, |
| 322 context->is3d() && WebGLRenderingContextBase::getWebGLVersion(context) >= 2, | 323 context->is3d() && WebGLRenderingContextBase::getWebGLVersion(context) >= 2, |
| 323 context.is3d() && WebGLRenderingContextBase::getWebGLVersion(&context) >= 2)
; | 324 context.is3d() && WebGLRenderingContextBase::getWebGLVersion(&context) >= 2)
; |
| 324 | 325 |
| 325 } // namespace blink | 326 } // namespace blink |
| 326 | 327 |
| 327 #endif | 328 #endif |
| OLD | NEW |