summaryrefslogtreecommitdiffstats
path: root/webkit/gpu/webgraphicscontext3d_in_process_impl.cc
diff options
context:
space:
mode:
authorsievers@chromium.org <sievers@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-01 00:06:27 +0000
committersievers@chromium.org <sievers@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-01 00:06:27 +0000
commite2946a407e60e0334292644310fb53a93badf70c (patch)
tree7de4e94bc66d64a357c7c315d0ba2f73b323d0d9 /webkit/gpu/webgraphicscontext3d_in_process_impl.cc
parent3b065302ffc29f4e34f54bf66d3595d363685275 (diff)
downloadchromium_src-e2946a407e60e0334292644310fb53a93badf70c.zip
chromium_src-e2946a407e60e0334292644310fb53a93badf70c.tar.gz
chromium_src-e2946a407e60e0334292644310fb53a93badf70c.tar.bz2
Add some extensions to the in-process GL shader translator.
If available allow (similar to cmdbuffer context): OES_standard_derivatives OES_EGL_image_external Review URL: https://codereview.chromium.org/11340057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165267 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/gpu/webgraphicscontext3d_in_process_impl.cc')
-rw-r--r--webkit/gpu/webgraphicscontext3d_in_process_impl.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/webkit/gpu/webgraphicscontext3d_in_process_impl.cc b/webkit/gpu/webgraphicscontext3d_in_process_impl.cc
index ff11852..27daf11 100644
--- a/webkit/gpu/webgraphicscontext3d_in_process_impl.cc
+++ b/webkit/gpu/webgraphicscontext3d_in_process_impl.cc
@@ -56,6 +56,8 @@ WebGraphicsContext3DInProcessImpl::WebGraphicsContext3DInProcessImpl(
have_ext_framebuffer_object_(false),
have_ext_framebuffer_multisample_(false),
have_angle_framebuffer_multisample_(false),
+ have_ext_oes_standard_derivatives_(false),
+ have_ext_oes_egl_image_external_(false),
texture_(0),
fbo_(0),
depth_stencil_buffer_(0),
@@ -228,6 +230,10 @@ bool WebGraphicsContext3DInProcessImpl::Initialize(
strstr(extensions, "GL_EXT_framebuffer_multisample") != NULL;
have_angle_framebuffer_multisample_ =
strstr(extensions, "GL_ANGLE_framebuffer_multisample") != NULL;
+ have_ext_oes_standard_derivatives_ =
+ strstr(extensions, "GL_OES_standard_derivatives") != NULL;
+ have_ext_oes_egl_image_external_ =
+ strstr(extensions, "GL_OES_EGL_image_external") != NULL;
ValidateAttributes();
@@ -1731,6 +1737,9 @@ bool WebGraphicsContext3DInProcessImpl::AngleCreateCompilers() {
// Always set to 1 for OpenGL ES.
resources.MaxDrawBuffers = 1;
+ resources.OES_standard_derivatives = have_ext_oes_standard_derivatives_;
+ resources.OES_EGL_image_external = have_ext_oes_egl_image_external_;
+
fragment_compiler_ = ShConstructCompiler(
SH_FRAGMENT_SHADER, SH_WEBGL_SPEC,
is_gles2_ ? SH_ESSL_OUTPUT : SH_GLSL_OUTPUT, &resources);