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 WebGL2RenderingContext_h | 5 #ifndef WebGL2RenderingContext_h |
6 #define WebGL2RenderingContext_h | 6 #define WebGL2RenderingContext_h |
7 | 7 |
8 #include "core/html/canvas/WebGL2RenderingContextBase.h" | 8 #include "core/html/canvas/WebGL2RenderingContextBase.h" |
9 | 9 |
10 namespace blink { | 10 namespace blink { |
11 | 11 |
12 class WebGL2RenderingContext : public WebGL2RenderingContextBase { | 12 class WebGL2RenderingContext : public WebGL2RenderingContextBase { |
13 DEFINE_WRAPPERTYPEINFO(); | 13 DEFINE_WRAPPERTYPEINFO(); |
14 public: | 14 public: |
15 static PassOwnPtrWillBeRawPtr<WebGL2RenderingContext> create(HTMLCanvasEleme
nt*, const CanvasContextCreationAttributes&); | 15 static PassOwnPtrWillBeRawPtr<WebGL2RenderingContext> create(HTMLCanvasEleme
nt*, const CanvasContextCreationAttributes&); |
16 ~WebGL2RenderingContext() override; | 16 ~WebGL2RenderingContext() override; |
17 | 17 |
18 unsigned version() const override { return 2; } | 18 unsigned version() const override { return 2; } |
19 String contextName() const override { return "WebGL2RenderingContext"; } | 19 String contextName() const override { return "WebGL2RenderingContext"; } |
20 void registerContextExtensions() override; | 20 void registerContextExtensions() override; |
21 | 21 |
22 DECLARE_VIRTUAL_TRACE(); | 22 DECLARE_VIRTUAL_TRACE(); |
23 | 23 |
24 protected: | 24 protected: |
25 WebGL2RenderingContext(HTMLCanvasElement* passedCanvas, PassOwnPtr<blink::We
bGraphicsContext3D>, const WebGLContextAttributes& requestedAttributes); | 25 WebGL2RenderingContext(HTMLCanvasElement* passedCanvas, PassOwnPtr<WebGraphi
csContext3D>, const WebGLContextAttributes& requestedAttributes); |
26 | 26 |
27 RefPtrWillBeMember<CHROMIUMSubscribeUniform> m_chromiumSubscribeUniform; | 27 RefPtrWillBeMember<CHROMIUMSubscribeUniform> m_chromiumSubscribeUniform; |
28 RefPtrWillBeMember<EXTTextureFilterAnisotropic> m_extTextureFilterAnisotropi
c; | 28 RefPtrWillBeMember<EXTTextureFilterAnisotropic> m_extTextureFilterAnisotropi
c; |
29 RefPtrWillBeMember<OESTextureFloatLinear> m_oesTextureFloatLinear; | 29 RefPtrWillBeMember<OESTextureFloatLinear> m_oesTextureFloatLinear; |
30 RefPtrWillBeMember<WebGLCompressedTextureATC> m_webglCompressedTextureATC; | 30 RefPtrWillBeMember<WebGLCompressedTextureATC> m_webglCompressedTextureATC; |
31 RefPtrWillBeMember<WebGLCompressedTextureETC1> m_webglCompressedTextureETC1; | 31 RefPtrWillBeMember<WebGLCompressedTextureETC1> m_webglCompressedTextureETC1; |
32 RefPtrWillBeMember<WebGLCompressedTexturePVRTC> m_webglCompressedTexturePVRT
C; | 32 RefPtrWillBeMember<WebGLCompressedTexturePVRTC> m_webglCompressedTexturePVRT
C; |
33 RefPtrWillBeMember<WebGLCompressedTextureS3TC> m_webglCompressedTextureS3TC; | 33 RefPtrWillBeMember<WebGLCompressedTextureS3TC> m_webglCompressedTextureS3TC; |
34 RefPtrWillBeMember<WebGLDebugRendererInfo> m_webglDebugRendererInfo; | 34 RefPtrWillBeMember<WebGLDebugRendererInfo> m_webglDebugRendererInfo; |
35 RefPtrWillBeMember<WebGLDebugShaders> m_webglDebugShaders; | 35 RefPtrWillBeMember<WebGLDebugShaders> m_webglDebugShaders; |
36 RefPtrWillBeMember<WebGLLoseContext> m_webglLoseContext; | 36 RefPtrWillBeMember<WebGLLoseContext> m_webglLoseContext; |
37 }; | 37 }; |
38 | 38 |
39 DEFINE_TYPE_CASTS(WebGL2RenderingContext, CanvasRenderingContext, context, | 39 DEFINE_TYPE_CASTS(WebGL2RenderingContext, CanvasRenderingContext, context, |
40 context->is3d() && WebGLRenderingContextBase::getWebGLVersion(context) == 2, | 40 context->is3d() && WebGLRenderingContextBase::getWebGLVersion(context) == 2, |
41 context.is3d() && WebGLRenderingContextBase::getWebGLVersion(&context) == 2)
; | 41 context.is3d() && WebGLRenderingContextBase::getWebGLVersion(&context) == 2)
; |
42 | 42 |
43 } // namespace blink | 43 } // namespace blink |
44 | 44 |
45 #endif | 45 #endif |
OLD | NEW |