Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Side by Side Diff: third_party/WebKit/Source/modules/webgl/WebGL2RenderingContext.h

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/CanvasRenderingContextFactory.h" 8 #include "core/html/canvas/CanvasRenderingContextFactory.h"
9 #include "modules/webgl/WebGL2RenderingContextBase.h" 9 #include "modules/webgl/WebGL2RenderingContextBase.h"
10 #include <memory>
10 11
11 namespace blink { 12 namespace blink {
12 13
13 class CanvasContextCreationAttributes; 14 class CanvasContextCreationAttributes;
14 class EXTColorBufferFloat; 15 class EXTColorBufferFloat;
15 16
16 class WebGL2RenderingContext : public WebGL2RenderingContextBase { 17 class WebGL2RenderingContext : public WebGL2RenderingContextBase {
17 DEFINE_WRAPPERTYPEINFO(); 18 DEFINE_WRAPPERTYPEINFO();
18 public: 19 public:
19 class Factory : public CanvasRenderingContextFactory { 20 class Factory : public CanvasRenderingContextFactory {
(...skipping 15 matching lines...) Expand all
35 String contextName() const override { return "WebGL2RenderingContext"; } 36 String contextName() const override { return "WebGL2RenderingContext"; }
36 void registerContextExtensions() override; 37 void registerContextExtensions() override;
37 void setCanvasGetContextResult(RenderingContext&) final; 38 void setCanvasGetContextResult(RenderingContext&) final;
38 void setOffscreenCanvasGetContextResult(OffscreenRenderingContext&) final; 39 void setOffscreenCanvasGetContextResult(OffscreenRenderingContext&) final;
39 40
40 DECLARE_VIRTUAL_TRACE(); 41 DECLARE_VIRTUAL_TRACE();
41 42
42 DECLARE_VIRTUAL_TRACE_WRAPPERS(); 43 DECLARE_VIRTUAL_TRACE_WRAPPERS();
43 44
44 protected: 45 protected:
45 WebGL2RenderingContext(HTMLCanvasElement* passedCanvas, PassOwnPtr<WebGraphi csContext3DProvider>, const WebGLContextAttributes& requestedAttributes); 46 WebGL2RenderingContext(HTMLCanvasElement* passedCanvas, std::unique_ptr<WebG raphicsContext3DProvider>, const WebGLContextAttributes& requestedAttributes);
46 47
47 Member<EXTColorBufferFloat> m_extColorBufferFloat; 48 Member<EXTColorBufferFloat> m_extColorBufferFloat;
48 Member<EXTDisjointTimerQuery> m_extDisjointTimerQuery; 49 Member<EXTDisjointTimerQuery> m_extDisjointTimerQuery;
49 Member<EXTTextureFilterAnisotropic> m_extTextureFilterAnisotropic; 50 Member<EXTTextureFilterAnisotropic> m_extTextureFilterAnisotropic;
50 Member<OESTextureFloatLinear> m_oesTextureFloatLinear; 51 Member<OESTextureFloatLinear> m_oesTextureFloatLinear;
51 Member<WebGLCompressedTextureASTC> m_webglCompressedTextureASTC; 52 Member<WebGLCompressedTextureASTC> m_webglCompressedTextureASTC;
52 Member<WebGLCompressedTextureATC> m_webglCompressedTextureATC; 53 Member<WebGLCompressedTextureATC> m_webglCompressedTextureATC;
53 Member<WebGLCompressedTextureETC1> m_webglCompressedTextureETC1; 54 Member<WebGLCompressedTextureETC1> m_webglCompressedTextureETC1;
54 Member<WebGLCompressedTexturePVRTC> m_webglCompressedTexturePVRTC; 55 Member<WebGLCompressedTexturePVRTC> m_webglCompressedTexturePVRTC;
55 Member<WebGLCompressedTextureS3TC> m_webglCompressedTextureS3TC; 56 Member<WebGLCompressedTextureS3TC> m_webglCompressedTextureS3TC;
56 Member<WebGLDebugRendererInfo> m_webglDebugRendererInfo; 57 Member<WebGLDebugRendererInfo> m_webglDebugRendererInfo;
57 Member<WebGLDebugShaders> m_webglDebugShaders; 58 Member<WebGLDebugShaders> m_webglDebugShaders;
58 Member<WebGLLoseContext> m_webglLoseContext; 59 Member<WebGLLoseContext> m_webglLoseContext;
59 }; 60 };
60 61
61 DEFINE_TYPE_CASTS(WebGL2RenderingContext, CanvasRenderingContext, context, 62 DEFINE_TYPE_CASTS(WebGL2RenderingContext, CanvasRenderingContext, context,
62 context->is3d() && WebGLRenderingContextBase::getWebGLVersion(context) == 2, 63 context->is3d() && WebGLRenderingContextBase::getWebGLVersion(context) == 2,
63 context.is3d() && WebGLRenderingContextBase::getWebGLVersion(&context) == 2) ; 64 context.is3d() && WebGLRenderingContextBase::getWebGLVersion(&context) == 2) ;
64 65
65 } // namespace blink 66 } // namespace blink
66 67
67 #endif 68 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698