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 void trace(Visitor*) override; | 22 void trace(Visitor*) override; |
23 | 23 |
24 protected: | 24 protected: |
25 WebGL2RenderingContext(HTMLCanvasElement* passedCanvas, PassOwnPtr<blink::We
bGraphicsContext3D>, const WebGLContextAttributes& requestedAttributes); | 25 WebGL2RenderingContext(HTMLCanvasElement* passedCanvas, PassOwnPtr<blink::We
bGraphicsContext3D>, const WebGLContextAttributes& requestedAttributes); |
26 | 26 |
27 RefPtr<WebGLDebugRendererInfo> m_webglDebugRendererInfo; | 27 RefPtrWillBeMember<WebGLDebugRendererInfo> m_webglDebugRendererInfo; |
28 RefPtr<WebGLDebugShaders> m_webglDebugShaders; | 28 RefPtrWillBeMember<WebGLDebugShaders> m_webglDebugShaders; |
29 }; | 29 }; |
30 | 30 |
31 DEFINE_TYPE_CASTS(WebGL2RenderingContext, CanvasRenderingContext, context, | 31 DEFINE_TYPE_CASTS(WebGL2RenderingContext, CanvasRenderingContext, context, |
32 context->is3d() && WebGLRenderingContextBase::getWebGLVersion(context) == 2, | 32 context->is3d() && WebGLRenderingContextBase::getWebGLVersion(context) == 2, |
33 context.is3d() && WebGLRenderingContextBase::getWebGLVersion(&context) == 2)
; | 33 context.is3d() && WebGLRenderingContextBase::getWebGLVersion(&context) == 2)
; |
34 | 34 |
35 } // namespace blink | 35 } // namespace blink |
36 | 36 |
37 #endif | 37 #endif |
OLD | NEW |