| 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 #include <memory> |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 ScriptValue getTexParameter(ScriptState*, GLenum target, GLenum pname) overr
ide; | 223 ScriptValue getTexParameter(ScriptState*, GLenum target, GLenum pname) overr
ide; |
| 224 ScriptValue getFramebufferAttachmentParameter(ScriptState*, GLenum target, G
Lenum attachment, GLenum pname) override; | 224 ScriptValue getFramebufferAttachmentParameter(ScriptState*, GLenum target, G
Lenum attachment, GLenum pname) override; |
| 225 void pixelStorei(GLenum pname, GLint param) override; | 225 void pixelStorei(GLenum pname, GLint param) override; |
| 226 void readPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum form
at, GLenum type, DOMArrayBufferView* pixels) override; | 226 void readPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum form
at, GLenum type, DOMArrayBufferView* pixels) override; |
| 227 void restoreCurrentFramebuffer() override; | 227 void restoreCurrentFramebuffer() override; |
| 228 | 228 |
| 229 EAGERLY_FINALIZE(); | 229 EAGERLY_FINALIZE(); |
| 230 DECLARE_VIRTUAL_TRACE(); | 230 DECLARE_VIRTUAL_TRACE(); |
| 231 | 231 |
| 232 protected: | 232 protected: |
| 233 WebGL2RenderingContextBase(HTMLCanvasElement*, std::unique_ptr<WebGraphicsCo
ntext3DProvider>, const WebGLContextAttributes& requestedAttributes); | 233 WebGL2RenderingContextBase(HTMLCanvasElement*, std::unique_ptr<WebGraphicsCo
ntext3DProvider>, const CanvasContextCreationAttributes& requestedAttributes); |
| 234 | 234 |
| 235 // Helper function to validate target and the attachment combination for get
FramebufferAttachmentParameters. | 235 // Helper function to validate target and the attachment combination for get
FramebufferAttachmentParameters. |
| 236 // Generate GL error and return false if parameters are illegal. | 236 // Generate GL error and return false if parameters are illegal. |
| 237 bool validateGetFramebufferAttachmentParameterFunc(const char* functionName,
GLenum target, GLenum attachment); | 237 bool validateGetFramebufferAttachmentParameterFunc(const char* functionName,
GLenum target, GLenum attachment); |
| 238 | 238 |
| 239 bool validateClearBuffer(const char* functionName, GLenum buffer, GLsizei le
ngth); | 239 bool validateClearBuffer(const char* functionName, GLenum buffer, GLsizei le
ngth); |
| 240 | 240 |
| 241 enum TexStorageType { | 241 enum TexStorageType { |
| 242 TexStorageType2D, | 242 TexStorageType2D, |
| 243 TexStorageType3D, | 243 TexStorageType3D, |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 ScopedPersistent<v8::Array> m_queryWrappers; | 328 ScopedPersistent<v8::Array> m_queryWrappers; |
| 329 }; | 329 }; |
| 330 | 330 |
| 331 DEFINE_TYPE_CASTS(WebGL2RenderingContextBase, CanvasRenderingContext, context, | 331 DEFINE_TYPE_CASTS(WebGL2RenderingContextBase, CanvasRenderingContext, context, |
| 332 context->is3d() && WebGLRenderingContextBase::getWebGLVersion(context) >= 2, | 332 context->is3d() && WebGLRenderingContextBase::getWebGLVersion(context) >= 2, |
| 333 context.is3d() && WebGLRenderingContextBase::getWebGLVersion(&context) >= 2)
; | 333 context.is3d() && WebGLRenderingContextBase::getWebGLVersion(&context) >= 2)
; |
| 334 | 334 |
| 335 } // namespace blink | 335 } // namespace blink |
| 336 | 336 |
| 337 #endif | 337 #endif |
| OLD | NEW |