summaryrefslogtreecommitdiffstats
path: root/gpu/blink
diff options
context:
space:
mode:
authorzmo <zmo@chromium.org>2015-06-08 21:14:19 -0700
committerCommit bot <commit-bot@chromium.org>2015-06-09 04:14:54 +0000
commit539d22c09d9ff40d132998b1d955ffc57bbfc05c (patch)
tree9291fc4d44e8cc4cc34378d45948d548e2aee383 /gpu/blink
parent3e8c40586a1a77f14c10a60b03b383700203b46b (diff)
downloadchromium_src-539d22c09d9ff40d132998b1d955ffc57bbfc05c.zip
chromium_src-539d22c09d9ff40d132998b1d955ffc57bbfc05c.tar.gz
chromium_src-539d22c09d9ff40d132998b1d955ffc57bbfc05c.tar.bz2
Teach GPU command buffer whether a context is webgl.
Then we initialize it differently. For example, if it's WebGL 1, we disallow NPOT support. Also, we initialize shader translator correctly once (before we have to initialize it to the default ES spec and then reset a new one with WebGL spec), so this is a speedup at WebGL context creation time. Also, we separate the idea of whether a context is ES2/ES3 or WebGL1/WebGL2. This is necessary because before we assume ES3==WebGL2, which isn't true, say, we may always want to use ES3, for WebGL 2 and for compositor, etc. BUG=497464 TEST=gpu_unittests, webgl_conformance, gl_tests R=kbr@chromium.org,piman@chromium.org Review URL: https://codereview.chromium.org/1143393007 Cr-Commit-Position: refs/heads/master@{#333439}
Diffstat (limited to 'gpu/blink')
-rw-r--r--gpu/blink/webgraphicscontext3d_impl.cc3
-rw-r--r--gpu/blink/webgraphicscontext3d_in_process_command_buffer_impl.cc4
-rw-r--r--gpu/blink/webgraphicscontext3d_in_process_command_buffer_impl.h1
3 files changed, 1 insertions, 7 deletions
diff --git a/gpu/blink/webgraphicscontext3d_impl.cc b/gpu/blink/webgraphicscontext3d_impl.cc
index f2e1434..8645c23 100644
--- a/gpu/blink/webgraphicscontext3d_impl.cc
+++ b/gpu/blink/webgraphicscontext3d_impl.cc
@@ -1230,8 +1230,7 @@ void WebGraphicsContext3DImpl::ConvertAttributes(
output_attribs->fail_if_major_perf_caveat =
attributes.failIfMajorPerformanceCaveat;
output_attribs->bind_generates_resource = false;
- output_attribs->es3_context_required =
- (attributes.webGL && attributes.webGLVersion == 2);
+ output_attribs->webgl_version = attributes.webGLVersion;
}
} // namespace gpu_blink
diff --git a/gpu/blink/webgraphicscontext3d_in_process_command_buffer_impl.cc b/gpu/blink/webgraphicscontext3d_in_process_command_buffer_impl.cc
index cc7871c..e661fc9 100644
--- a/gpu/blink/webgraphicscontext3d_in_process_command_buffer_impl.cc
+++ b/gpu/blink/webgraphicscontext3d_in_process_command_buffer_impl.cc
@@ -82,7 +82,6 @@ WebGraphicsContext3DInProcessCommandBufferImpl::
bool is_offscreen,
gfx::AcceleratedWidget window)
: share_resources_(attributes.shareResources),
- webgl_context_(attributes.webGL),
is_offscreen_(is_offscreen),
window_(window),
context_(context.Pass()) {
@@ -140,9 +139,6 @@ bool WebGraphicsContext3DInProcessCommandBufferImpl::MaybeInitializeGL() {
real_gl_ = context_->GetImplementation();
setGLInterface(real_gl_);
- if (real_gl_ && webgl_context_)
- real_gl_->EnableFeatureCHROMIUM("webgl_enable_glsl_webgl_validation");
-
initialized_ = true;
return true;
}
diff --git a/gpu/blink/webgraphicscontext3d_in_process_command_buffer_impl.h b/gpu/blink/webgraphicscontext3d_in_process_command_buffer_impl.h
index 32bcbbf..fa7542c 100644
--- a/gpu/blink/webgraphicscontext3d_in_process_command_buffer_impl.h
+++ b/gpu/blink/webgraphicscontext3d_in_process_command_buffer_impl.h
@@ -89,7 +89,6 @@ class GPU_BLINK_EXPORT WebGraphicsContext3DInProcessCommandBufferImpl
::gpu::gles2::ContextCreationAttribHelper attribs_;
bool share_resources_;
- bool webgl_context_;
bool is_offscreen_;
// Only used when not offscreen.