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

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

Issue 2080623002: Revert "Remove OwnPtr from Blink." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 /* 1 /*
2 * Copyright (C) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 10 matching lines...) Expand all
21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */ 24 */
25 25
26 #ifndef WebGLRenderingContext_h 26 #ifndef WebGLRenderingContext_h
27 #define WebGLRenderingContext_h 27 #define WebGLRenderingContext_h
28 28
29 #include "core/html/canvas/CanvasRenderingContextFactory.h" 29 #include "core/html/canvas/CanvasRenderingContextFactory.h"
30 #include "modules/webgl/WebGLRenderingContextBase.h" 30 #include "modules/webgl/WebGLRenderingContextBase.h"
31 #include <memory>
32 31
33 namespace blink { 32 namespace blink {
34 33
35 class CanvasContextCreationAttributes; 34 class CanvasContextCreationAttributes;
36 35
37 class WebGLRenderingContext final : public WebGLRenderingContextBase { 36 class WebGLRenderingContext final : public WebGLRenderingContextBase {
38 DEFINE_WRAPPERTYPEINFO(); 37 DEFINE_WRAPPERTYPEINFO();
39 public: 38 public:
40 class Factory : public CanvasRenderingContextFactory { 39 class Factory : public CanvasRenderingContextFactory {
41 WTF_MAKE_NONCOPYABLE(Factory); 40 WTF_MAKE_NONCOPYABLE(Factory);
(...skipping 16 matching lines...) Expand all
58 void registerContextExtensions() override; 57 void registerContextExtensions() override;
59 void setCanvasGetContextResult(RenderingContext&) final; 58 void setCanvasGetContextResult(RenderingContext&) final;
60 void setOffscreenCanvasGetContextResult(OffscreenRenderingContext&) final; 59 void setOffscreenCanvasGetContextResult(OffscreenRenderingContext&) final;
61 60
62 EAGERLY_FINALIZE(); 61 EAGERLY_FINALIZE();
63 DECLARE_VIRTUAL_TRACE(); 62 DECLARE_VIRTUAL_TRACE();
64 63
65 DECLARE_VIRTUAL_TRACE_WRAPPERS(); 64 DECLARE_VIRTUAL_TRACE_WRAPPERS();
66 65
67 private: 66 private:
68 WebGLRenderingContext(HTMLCanvasElement*, std::unique_ptr<WebGraphicsContext 3DProvider>, const WebGLContextAttributes&); 67 WebGLRenderingContext(HTMLCanvasElement*, PassOwnPtr<WebGraphicsContext3DPro vider>, const WebGLContextAttributes&);
69 WebGLRenderingContext(OffscreenCanvas*, std::unique_ptr<WebGraphicsContext3D Provider>, const WebGLContextAttributes&); 68 WebGLRenderingContext(OffscreenCanvas*, PassOwnPtr<WebGraphicsContext3DProvi der>, const WebGLContextAttributes&);
70 69
71 // Enabled extension objects. 70 // Enabled extension objects.
72 Member<ANGLEInstancedArrays> m_angleInstancedArrays; 71 Member<ANGLEInstancedArrays> m_angleInstancedArrays;
73 Member<EXTBlendMinMax> m_extBlendMinMax; 72 Member<EXTBlendMinMax> m_extBlendMinMax;
74 Member<EXTDisjointTimerQuery> m_extDisjointTimerQuery; 73 Member<EXTDisjointTimerQuery> m_extDisjointTimerQuery;
75 Member<EXTFragDepth> m_extFragDepth; 74 Member<EXTFragDepth> m_extFragDepth;
76 Member<EXTShaderTextureLOD> m_extShaderTextureLOD; 75 Member<EXTShaderTextureLOD> m_extShaderTextureLOD;
77 Member<EXTsRGB> m_extsRGB; 76 Member<EXTsRGB> m_extsRGB;
78 Member<EXTTextureFilterAnisotropic> m_extTextureFilterAnisotropic; 77 Member<EXTTextureFilterAnisotropic> m_extTextureFilterAnisotropic;
79 Member<OESTextureFloat> m_oesTextureFloat; 78 Member<OESTextureFloat> m_oesTextureFloat;
(...skipping 15 matching lines...) Expand all
95 Member<WebGLDepthTexture> m_webglDepthTexture; 94 Member<WebGLDepthTexture> m_webglDepthTexture;
96 }; 95 };
97 96
98 DEFINE_TYPE_CASTS(WebGLRenderingContext, CanvasRenderingContext, context, 97 DEFINE_TYPE_CASTS(WebGLRenderingContext, CanvasRenderingContext, context,
99 context->is3d() && WebGLRenderingContextBase::getWebGLVersion(context) == 1, 98 context->is3d() && WebGLRenderingContextBase::getWebGLVersion(context) == 1,
100 context.is3d() && WebGLRenderingContextBase::getWebGLVersion(&context) == 1) ; 99 context.is3d() && WebGLRenderingContextBase::getWebGLVersion(&context) == 1) ;
101 100
102 } // namespace blink 101 } // namespace blink
103 102
104 #endif // WebGLRenderingContext_h 103 #endif // WebGLRenderingContext_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698