Chromium Code Reviews| 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 |