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

Unified Diff: third_party/WebKit/Source/modules/webgl/WebGL2RenderingContext.cpp

Issue 2451943002: Remove runtime flag 'UnsafeES3APIs' from blink webgl (Closed)
Patch Set: Addressed kbr@'s feedback, and rebased the code Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/webgl/WebGL2RenderingContext.cpp
diff --git a/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContext.cpp b/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContext.cpp
index 6704430fe103e0b375b46e7367cf760d281821bd..ed95838c3eb56735c2c4333a6b1d0c6f449fe519 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContext.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContext.cpp
@@ -38,17 +38,14 @@ CanvasRenderingContext* WebGL2RenderingContext::Factory::create(
HTMLCanvasElement* canvas,
const CanvasContextCreationAttributes& attrs,
Document&) {
- if (!RuntimeEnabledFeatures::unsafeES3APIsEnabled()) {
+ std::unique_ptr<WebGraphicsContext3DProvider> contextProvider(
+ createWebGraphicsContext3DProvider(canvas, attrs, 2));
+ if (!contextProvider) {
canvas->dispatchEvent(WebGLContextEvent::create(
EventTypeNames::webglcontextcreationerror, false, true,
- "Creation of WebGL2 contexts disabled."));
+ "Failed to create a WebGL2 context."));
return nullptr;
}
-
- std::unique_ptr<WebGraphicsContext3DProvider> contextProvider(
- createWebGraphicsContext3DProvider(canvas, attrs, 2));
- if (!contextProvider)
- return nullptr;
gpu::gles2::GLES2Interface* gl = contextProvider->contextGL();
std::unique_ptr<Extensions3DUtil> extensionsUtil =
Extensions3DUtil::create(gl);

Powered by Google App Engine
This is Rietveld 408576698