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

Unified Diff: gpu/blink/webgraphicscontext3d_impl.cc

Issue 1325433003: command_buffer: Add support for creating non-WebGL ES 3 contexts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gn Created 5 years, 4 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: gpu/blink/webgraphicscontext3d_impl.cc
diff --git a/gpu/blink/webgraphicscontext3d_impl.cc b/gpu/blink/webgraphicscontext3d_impl.cc
index 8fe23ee54933ca82336732698457a16aa95e2d34..a47096eb9c47453574126fdb10b402678c0e3ed5 100644
--- a/gpu/blink/webgraphicscontext3d_impl.cc
+++ b/gpu/blink/webgraphicscontext3d_impl.cc
@@ -1244,7 +1244,18 @@ void WebGraphicsContext3DImpl::ConvertAttributes(
output_attribs->fail_if_major_perf_caveat =
attributes.failIfMajorPerformanceCaveat;
output_attribs->bind_generates_resource = false;
- output_attribs->webgl_version = attributes.webGLVersion;
+ switch (attributes.webGLVersion) {
+ default:
Zhenyao Mo 2015/08/28 17:16:24 nit: move default to the last.
Kimmo Kinnunen 2015/08/31 12:23:12 Done...
+ NOTREACHED();
+ case 1:
+ output_attribs->context_type =
+ ::gpu::gles2::ContextCreationAttribHelper::CONTEXT_TYPE_WEBGL1;
+ break;
+ case 2:
+ output_attribs->context_type =
+ ::gpu::gles2::ContextCreationAttribHelper::CONTEXT_TYPE_WEBGL2;
+ break;
+ }
}
} // namespace gpu_blink

Powered by Google App Engine
This is Rietveld 408576698