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

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

Issue 1761003003: Use a union typdef for the return type of canvas.getContext (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: *Pass*RefPtrWillBeRawPtr Created 4 years, 9 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 #include "modules/webgl/WebGL2RenderingContext.h" 5 #include "modules/webgl/WebGL2RenderingContext.h"
6 6
7 #include "bindings/modules/v8/UnionTypesModules.h"
7 #include "core/frame/LocalFrame.h" 8 #include "core/frame/LocalFrame.h"
8 #include "core/frame/Settings.h" 9 #include "core/frame/Settings.h"
9 #include "core/loader/FrameLoader.h" 10 #include "core/loader/FrameLoader.h"
10 #include "core/loader/FrameLoaderClient.h" 11 #include "core/loader/FrameLoaderClient.h"
11 #include "modules/webgl/CHROMIUMSubscribeUniform.h" 12 #include "modules/webgl/CHROMIUMSubscribeUniform.h"
12 #include "modules/webgl/EXTColorBufferFloat.h" 13 #include "modules/webgl/EXTColorBufferFloat.h"
13 #include "modules/webgl/EXTDisjointTimerQuery.h" 14 #include "modules/webgl/EXTDisjointTimerQuery.h"
14 #include "modules/webgl/EXTTextureFilterAnisotropic.h" 15 #include "modules/webgl/EXTTextureFilterAnisotropic.h"
15 #include "modules/webgl/OESTextureFloatLinear.h" 16 #include "modules/webgl/OESTextureFloatLinear.h"
16 #include "modules/webgl/WebGLCompressedTextureASTC.h" 17 #include "modules/webgl/WebGLCompressedTextureASTC.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 WebGL2RenderingContext::WebGL2RenderingContext(HTMLCanvasElement* passedCanvas, PassOwnPtr<WebGraphicsContext3D> context, const WebGLContextAttributes& requeste dAttributes) 69 WebGL2RenderingContext::WebGL2RenderingContext(HTMLCanvasElement* passedCanvas, PassOwnPtr<WebGraphicsContext3D> context, const WebGLContextAttributes& requeste dAttributes)
69 : WebGL2RenderingContextBase(passedCanvas, context, requestedAttributes) 70 : WebGL2RenderingContextBase(passedCanvas, context, requestedAttributes)
70 { 71 {
71 } 72 }
72 73
73 WebGL2RenderingContext::~WebGL2RenderingContext() 74 WebGL2RenderingContext::~WebGL2RenderingContext()
74 { 75 {
75 76
76 } 77 }
77 78
79 void WebGL2RenderingContext::setCanvasGetContextResult(RenderingContext& result)
80 {
81 result.setWebGL2RenderingContext(RefPtrWillBeRawPtr<WebGL2RenderingContext>( this));
sof 2016/03/09 22:05:26 PassRefPtr<>
82 }
83
78 void WebGL2RenderingContext::registerContextExtensions() 84 void WebGL2RenderingContext::registerContextExtensions()
79 { 85 {
80 // Register extensions. 86 // Register extensions.
81 registerExtension<CHROMIUMSubscribeUniform>(m_chromiumSubscribeUniform); 87 registerExtension<CHROMIUMSubscribeUniform>(m_chromiumSubscribeUniform);
82 registerExtension<EXTColorBufferFloat>(m_extColorBufferFloat, DraftExtension ); 88 registerExtension<EXTColorBufferFloat>(m_extColorBufferFloat, DraftExtension );
83 registerExtension<EXTDisjointTimerQuery>(m_extDisjointTimerQuery); 89 registerExtension<EXTDisjointTimerQuery>(m_extDisjointTimerQuery);
84 registerExtension<EXTTextureFilterAnisotropic>(m_extTextureFilterAnisotropic ); 90 registerExtension<EXTTextureFilterAnisotropic>(m_extTextureFilterAnisotropic );
85 registerExtension<OESTextureFloatLinear>(m_oesTextureFloatLinear); 91 registerExtension<OESTextureFloatLinear>(m_oesTextureFloatLinear);
86 registerExtension<WebGLCompressedTextureASTC>(m_webglCompressedTextureASTC); 92 registerExtension<WebGLCompressedTextureASTC>(m_webglCompressedTextureASTC);
87 registerExtension<WebGLCompressedTextureATC>(m_webglCompressedTextureATC); 93 registerExtension<WebGLCompressedTextureATC>(m_webglCompressedTextureATC);
(...skipping 17 matching lines...) Expand all
105 visitor->trace(m_webglCompressedTextureETC1); 111 visitor->trace(m_webglCompressedTextureETC1);
106 visitor->trace(m_webglCompressedTexturePVRTC); 112 visitor->trace(m_webglCompressedTexturePVRTC);
107 visitor->trace(m_webglCompressedTextureS3TC); 113 visitor->trace(m_webglCompressedTextureS3TC);
108 visitor->trace(m_webglDebugRendererInfo); 114 visitor->trace(m_webglDebugRendererInfo);
109 visitor->trace(m_webglDebugShaders); 115 visitor->trace(m_webglDebugShaders);
110 visitor->trace(m_webglLoseContext); 116 visitor->trace(m_webglLoseContext);
111 WebGL2RenderingContextBase::trace(visitor); 117 WebGL2RenderingContextBase::trace(visitor);
112 } 118 }
113 119
114 } // namespace blink 120 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698