| 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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 ScriptValue getTexParameter(ScriptState*, GLenum target, GLenum pname) overr
ide; | 211 ScriptValue getTexParameter(ScriptState*, GLenum target, GLenum pname) overr
ide; |
| 212 ScriptValue getFramebufferAttachmentParameter(ScriptState*, GLenum target, G
Lenum attachment, GLenum pname) override; | 212 ScriptValue getFramebufferAttachmentParameter(ScriptState*, GLenum target, G
Lenum attachment, GLenum pname) override; |
| 213 void pixelStorei(GLenum pname, GLint param) override; | 213 void pixelStorei(GLenum pname, GLint param) override; |
| 214 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; |
| 215 void restoreCurrentFramebuffer() override; | 215 void restoreCurrentFramebuffer() override; |
| 216 | 216 |
| 217 EAGERLY_FINALIZE(); | 217 EAGERLY_FINALIZE(); |
| 218 DECLARE_VIRTUAL_TRACE(); | 218 DECLARE_VIRTUAL_TRACE(); |
| 219 | 219 |
| 220 protected: | 220 protected: |
| 221 WebGL2RenderingContextBase(HTMLCanvasElement*, std::unique_ptr<WebGraphicsCo
ntext3DProvider>, const WebGLContextAttributes& requestedAttributes); | 221 WebGL2RenderingContextBase(HTMLCanvasElement*, std::unique_ptr<WebGraphicsCo
ntext3DProvider>, const CanvasContextCreationAttributes& requestedAttributes); |
| 222 | 222 |
| 223 // 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. |
| 224 // Generate GL error and return false if parameters are illegal. | 224 // Generate GL error and return false if parameters are illegal. |
| 225 bool validateGetFramebufferAttachmentParameterFunc(const char* functionName,
GLenum target, GLenum attachment); | 225 bool validateGetFramebufferAttachmentParameterFunc(const char* functionName,
GLenum target, GLenum attachment); |
| 226 | 226 |
| 227 bool validateClearBuffer(const char* functionName, GLenum buffer, GLsizei le
ngth); | 227 bool validateClearBuffer(const char* functionName, GLenum buffer, GLsizei le
ngth); |
| 228 | 228 |
| 229 enum TexStorageType { | 229 enum TexStorageType { |
| 230 TexStorageType2D, | 230 TexStorageType2D, |
| 231 TexStorageType3D, | 231 TexStorageType3D, |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 ScopedPersistent<v8::Array> m_queryWrappers; | 316 ScopedPersistent<v8::Array> m_queryWrappers; |
| 317 }; | 317 }; |
| 318 | 318 |
| 319 DEFINE_TYPE_CASTS(WebGL2RenderingContextBase, CanvasRenderingContext, context, | 319 DEFINE_TYPE_CASTS(WebGL2RenderingContextBase, CanvasRenderingContext, context, |
| 320 context->is3d() && WebGLRenderingContextBase::getWebGLVersion(context) >= 2, | 320 context->is3d() && WebGLRenderingContextBase::getWebGLVersion(context) >= 2, |
| 321 context.is3d() && WebGLRenderingContextBase::getWebGLVersion(&context) >= 2)
; | 321 context.is3d() && WebGLRenderingContextBase::getWebGLVersion(&context) >= 2)
; |
| 322 | 322 |
| 323 } // namespace blink | 323 } // namespace blink |
| 324 | 324 |
| 325 #endif | 325 #endif |
| OLD | NEW |