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

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

Issue 1979953002: Remove OwnPtr::release() calls in modules/ (part 3). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 "bindings/modules/v8/UnionTypesModules.h"
8 #include "core/frame/LocalFrame.h" 8 #include "core/frame/LocalFrame.h"
9 #include "core/frame/Settings.h" 9 #include "core/frame/Settings.h"
10 #include "core/loader/FrameLoader.h" 10 #include "core/loader/FrameLoader.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 return nullptr; 43 return nullptr;
44 gpu::gles2::GLES2Interface* gl = contextProvider->contextGL(); 44 gpu::gles2::GLES2Interface* gl = contextProvider->contextGL();
45 OwnPtr<Extensions3DUtil> extensionsUtil = Extensions3DUtil::create(gl); 45 OwnPtr<Extensions3DUtil> extensionsUtil = Extensions3DUtil::create(gl);
46 if (!extensionsUtil) 46 if (!extensionsUtil)
47 return nullptr; 47 return nullptr;
48 if (extensionsUtil->supportsExtension("GL_EXT_debug_marker")) { 48 if (extensionsUtil->supportsExtension("GL_EXT_debug_marker")) {
49 String contextLabel(String::format("WebGL2RenderingContext-%p", contextP rovider.get())); 49 String contextLabel(String::format("WebGL2RenderingContext-%p", contextP rovider.get()));
50 gl->PushGroupMarkerEXT(0, contextLabel.ascii().data()); 50 gl->PushGroupMarkerEXT(0, contextLabel.ascii().data());
51 } 51 }
52 52
53 WebGL2RenderingContext* renderingContext = new WebGL2RenderingContext(canvas , contextProvider.release(), attributes); 53 WebGL2RenderingContext* renderingContext = new WebGL2RenderingContext(canvas , std::move(contextProvider), attributes);
54 54
55 if (!renderingContext->drawingBuffer()) { 55 if (!renderingContext->drawingBuffer()) {
56 canvas->dispatchEvent(WebGLContextEvent::create(EventTypeNames::webglcon textcreationerror, false, true, "Could not create a WebGL2 context.")); 56 canvas->dispatchEvent(WebGLContextEvent::create(EventTypeNames::webglcon textcreationerror, false, true, "Could not create a WebGL2 context."));
57 return nullptr; 57 return nullptr;
58 } 58 }
59 59
60 renderingContext->initializeNewContext(); 60 renderingContext->initializeNewContext();
61 renderingContext->registerContextExtensions(); 61 renderingContext->registerContextExtensions();
62 62
63 return renderingContext; 63 return renderingContext;
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 visitor->traceWrappers(m_webglCompressedTextureATC); 138 visitor->traceWrappers(m_webglCompressedTextureATC);
139 visitor->traceWrappers(m_webglCompressedTextureETC1); 139 visitor->traceWrappers(m_webglCompressedTextureETC1);
140 visitor->traceWrappers(m_webglCompressedTexturePVRTC); 140 visitor->traceWrappers(m_webglCompressedTexturePVRTC);
141 visitor->traceWrappers(m_webglCompressedTextureS3TC); 141 visitor->traceWrappers(m_webglCompressedTextureS3TC);
142 visitor->traceWrappers(m_webglDebugRendererInfo); 142 visitor->traceWrappers(m_webglDebugRendererInfo);
143 visitor->traceWrappers(m_webglDebugShaders); 143 visitor->traceWrappers(m_webglDebugShaders);
144 visitor->traceWrappers(m_webglLoseContext); 144 visitor->traceWrappers(m_webglLoseContext);
145 } 145 }
146 146
147 } // namespace blink 147 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698