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

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: Created 5 years, 3 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
« no previous file with comments | « gpu/BUILD.gn ('k') | gpu/command_buffer/client/gles2_c_lib.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/blink/webgraphicscontext3d_impl.cc
diff --git a/gpu/blink/webgraphicscontext3d_impl.cc b/gpu/blink/webgraphicscontext3d_impl.cc
index 2b39c53fe1b0341f9abef68b5ab20ff4bd5ccf58..de6201be769315d76f427e32df5830e8834715c2 100644
--- a/gpu/blink/webgraphicscontext3d_impl.cc
+++ b/gpu/blink/webgraphicscontext3d_impl.cc
@@ -1251,7 +1251,20 @@ 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) {
+ case 0:
Kimmo Kinnunen 2015/09/05 10:10:46 So this case for "webGLVersion" needed to be handl
+ output_attribs->context_type = ::gpu::gles2::CONTEXT_TYPE_OPENGLES2;
+ break;
+ case 1:
+ output_attribs->context_type = ::gpu::gles2::CONTEXT_TYPE_WEBGL1;
+ break;
+ case 2:
+ output_attribs->context_type = ::gpu::gles2::CONTEXT_TYPE_WEBGL2;
+ break;
+ default:
+ output_attribs->context_type = ::gpu::gles2::CONTEXT_TYPE_OPENGLES2;
+ break;
+ }
}
} // namespace gpu_blink
« no previous file with comments | « gpu/BUILD.gn ('k') | gpu/command_buffer/client/gles2_c_lib.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698