diff options
author | twiz@chromium.org <twiz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-03 16:31:04 +0000 |
---|---|---|
committer | twiz@chromium.org <twiz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-03 16:31:04 +0000 |
commit | f0d7474c418a8ecd7021eda7a5124b20f55fc757 (patch) | |
tree | 5ab7aff6cc6dd133a76659378e665b65c2203cb4 /webkit/gpu | |
parent | 923402f3109fc8ee9962dad0724a96be69e93e56 (diff) | |
download | chromium_src-f0d7474c418a8ecd7021eda7a5124b20f55fc757.zip chromium_src-f0d7474c418a8ecd7021eda7a5124b20f55fc757.tar.gz chromium_src-f0d7474c418a8ecd7021eda7a5124b20f55fc757.tar.bz2 |
Add an additional feature to GLES2DecoderImpl that is used to force the context to obey WebGL feature semantics.
The 'force_webgl_glsl_validation' flag is used to override the FeatureInfo parameters of the context group.
This change enables all extensions for WebGL contexts, in preparation for allowing resource sharing with the compositor.
BUG=96605
TEST=https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/sdk/tests/webgl-conformance-tests.html
Review URL: http://codereview.chromium.org/7782038
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103724 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/gpu')
-rw-r--r-- | webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc b/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc index d777b93..6e14dad 100644 --- a/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc +++ b/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc @@ -603,14 +603,6 @@ WebGraphicsContext3DInProcessCommandBufferImpl:: g_all_shared_contexts.Pointer()->erase(this); } -// This string should only be passed for WebGL contexts. Nothing ELSE!!! -// Compositor contexts, Canvas2D contexts, Pepper Contexts, nor any other use of -// a context should not pass this string. -static const char* kWebGLPreferredGLExtensions = - "GL_OES_packed_depth_stencil " - "GL_OES_depth24 " - "GL_CHROMIUM_webglsl"; - bool WebGraphicsContext3DInProcessCommandBufferImpl::initialize( WebGraphicsContext3D::Attributes attributes, WebKit::WebView* web_view, @@ -631,8 +623,7 @@ bool WebGraphicsContext3DInProcessCommandBufferImpl::initialize( GLInProcessContext::NONE, }; - const char* preferred_extensions = attributes.noExtensions ? - kWebGLPreferredGLExtensions : "*"; + const char* preferred_extensions = "*"; GURL active_url; if (web_view && web_view->mainFrame()) @@ -669,6 +660,10 @@ bool WebGraphicsContext3DInProcessCommandBufferImpl::initialize( return false; gl_ = context_->GetImplementation(); + + if (gl_ && attributes.noExtensions) + gl_->EnableFeatureCHROMIUM("webgl_enable_glsl_webgl_validation"); + context_->SetContextLostCallback( NewCallback( this, |