Commit 61641f5a authored by oetuaho@nvidia.com's avatar oetuaho@nvidia.com

Use webGL context creation attribute to activate GLSL validation

Previously, GLSL validation was implicitly enabled on contexts that had
the noExtensions flag on. Use the webGL flag instead, making the code
less fragile.

BUG=397183
TEST=WebGL conformance tests

Review URL: https://codereview.chromium.org/421513002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285887 0039d316-1c4b-4281-b951-d872f2087c98
parent 39438d7d
......@@ -156,9 +156,7 @@ bool WebGraphicsContext3DCommandBufferImpl::MaybeInitializeGL() {
return false;
}
// TODO(twiz): This code is too fragile in that it assumes that only WebGL
// contexts will request noExtensions.
if (gl_ && attributes_.noExtensions)
if (gl_ && attributes_.webGL)
gl_->EnableFeatureCHROMIUM("webgl_enable_glsl_webgl_validation");
command_buffer_->SetChannelErrorCallback(
......
......@@ -105,7 +105,7 @@ WebGraphicsContext3DInProcessCommandBufferImpl::
bool is_offscreen,
gfx::AcceleratedWidget window)
: share_resources_(attributes.shareResources),
webgl_context_(attributes.noExtensions),
webgl_context_(attributes.webGL),
is_offscreen_(is_offscreen),
window_(window),
context_(context.Pass()) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment