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

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

Issue 1790753002: Expose GLES2Interface to blink, and delete isContextLost() from WGC3D. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: wgc3d: deps-for-tests 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 "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 22 matching lines...) Expand all
33 { 33 {
34 if (!RuntimeEnabledFeatures::unsafeES3APIsEnabled()) { 34 if (!RuntimeEnabledFeatures::unsafeES3APIsEnabled()) {
35 canvas->dispatchEvent(WebGLContextEvent::create(EventTypeNames::webglcon textcreationerror, false, true, "Creation of WebGL2 contexts disabled.")); 35 canvas->dispatchEvent(WebGLContextEvent::create(EventTypeNames::webglcon textcreationerror, false, true, "Creation of WebGL2 contexts disabled."));
36 return nullptr; 36 return nullptr;
37 } 37 }
38 38
39 WebGLContextAttributes attributes = toWebGLContextAttributes(attrs); 39 WebGLContextAttributes attributes = toWebGLContextAttributes(attrs);
40 OwnPtr<WebGraphicsContext3D> context(createWebGraphicsContext3D(canvas, attr ibutes, 2)); 40 OwnPtr<WebGraphicsContext3D> context(createWebGraphicsContext3D(canvas, attr ibutes, 2));
41 if (!context) 41 if (!context)
42 return nullptr; 42 return nullptr;
43 OwnPtr<Extensions3DUtil> extensionsUtil = Extensions3DUtil::create(context.g et()); 43 OwnPtr<Extensions3DUtil> extensionsUtil = Extensions3DUtil::create(context.g et(), context->getGLES2Interface());
44 if (!extensionsUtil) 44 if (!extensionsUtil)
45 return nullptr; 45 return nullptr;
46 if (extensionsUtil->supportsExtension("GL_EXT_debug_marker")) { 46 if (extensionsUtil->supportsExtension("GL_EXT_debug_marker")) {
47 String contextLabel(String::format("WebGL2RenderingContext-%p", context. get())); 47 String contextLabel(String::format("WebGL2RenderingContext-%p", context. get()));
48 context->pushGroupMarkerEXT(contextLabel.ascii().data()); 48 context->pushGroupMarkerEXT(contextLabel.ascii().data());
49 } 49 }
50 50
51 OwnPtrWillBeRawPtr<WebGL2RenderingContext> renderingContext = adoptPtrWillBe Noop(new WebGL2RenderingContext(canvas, context.release(), attributes)); 51 OwnPtrWillBeRawPtr<WebGL2RenderingContext> renderingContext = adoptPtrWillBe Noop(new WebGL2RenderingContext(canvas, context.release(), attributes));
52 52
53 if (!renderingContext->drawingBuffer()) { 53 if (!renderingContext->drawingBuffer()) {
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 visitor->trace(m_webglCompressedTextureETC1); 111 visitor->trace(m_webglCompressedTextureETC1);
112 visitor->trace(m_webglCompressedTexturePVRTC); 112 visitor->trace(m_webglCompressedTexturePVRTC);
113 visitor->trace(m_webglCompressedTextureS3TC); 113 visitor->trace(m_webglCompressedTextureS3TC);
114 visitor->trace(m_webglDebugRendererInfo); 114 visitor->trace(m_webglDebugRendererInfo);
115 visitor->trace(m_webglDebugShaders); 115 visitor->trace(m_webglDebugShaders);
116 visitor->trace(m_webglLoseContext); 116 visitor->trace(m_webglLoseContext);
117 WebGL2RenderingContextBase::trace(visitor); 117 WebGL2RenderingContextBase::trace(visitor);
118 } 118 }
119 119
120 } // namespace blink 120 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/webgl/DEPS ('k') | third_party/WebKit/Source/modules/webgl/WebGLRenderingContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698