Index: gpu/command_buffer/service/gles2_cmd_decoder.cc |
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc |
index f97710e86a61009ce7b6b54517f63040d5f8cb3b..7ea1a06e73bdf90cbccf38f381c3188bc6d7f7ac 100644 |
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc |
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc |
@@ -1473,6 +1473,11 @@ class GLES2DecoderImpl : public GLES2Decoder, |
// Wrapper for glReleaseShaderCompiler. |
void DoReleaseShaderCompiler() { } |
+ // Wrappers for glSamplerParameter*v functions. |
+ void DoSamplerParameterfv( |
+ GLuint sampler, GLenum pname, const GLfloat* params); |
+ void DoSamplerParameteriv(GLuint sampler, GLenum pname, const GLint* params); |
+ |
// Wrappers for glTexParameter functions. |
void DoTexParameterf(GLenum target, GLenum pname, GLfloat param); |
void DoTexParameteri(GLenum target, GLenum pname, GLint param); |
@@ -2955,6 +2960,10 @@ bool GLES2DecoderImpl::InitializeShaderTranslator() { |
if (workarounds().regenerate_struct_names) |
driver_bug_workarounds |= SH_REGENERATE_STRUCT_NAMES; |
+ if (CommandLine::ForCurrentProcess()->HasSwitch( |
+ switches::kEmulateShaderPrecision)) |
+ resources.WEBGL_debug_shader_precision = true; |
+ |
vertex_translator_ = shader_translator_cache()->GetTranslator( |
GL_VERTEX_SHADER, |
shader_spec, |
@@ -4269,6 +4278,14 @@ void GLES2DecoderImpl::SetIgnoreCachedStateForTest(bool ignore) { |
void GLES2DecoderImpl::OnFboChanged() const { |
if (workarounds().restore_scissor_on_fbo_change) |
state_.fbo_binding_for_scissor_workaround_dirty_ = true; |
+ |
+ if (workarounds().gl_begin_gl_end_on_fbo_change_to_backbuffer) { |
+ GLint bound_fbo_unsigned = -1; |
+ glGetIntegerv(GL_FRAMEBUFFER_BINDING_EXT, &bound_fbo_unsigned); |
+ GLuint bound_fbo = static_cast<GLuint>(bound_fbo_unsigned); |
+ if (surface_ && surface_->GetBackingFrameBufferObject() == bound_fbo) |
+ surface_->NotifyWasBound(); |
+ } |
} |
// Called after the FBO is checked for completeness. |
@@ -5858,6 +5875,18 @@ void GLES2DecoderImpl::DoLinkProgram(GLuint program_id) { |
ExitCommandProcessingEarly(); |
}; |
+void GLES2DecoderImpl::DoSamplerParameterfv( |
+ GLuint sampler, GLenum pname, const GLfloat* params) { |
+ DCHECK(params); |
+ glSamplerParameterf(sampler, pname, params[0]); |
+} |
+ |
+void GLES2DecoderImpl::DoSamplerParameteriv( |
+ GLuint sampler, GLenum pname, const GLint* params) { |
+ DCHECK(params); |
+ glSamplerParameteri(sampler, pname, params[0]); |
+} |
+ |
void GLES2DecoderImpl::DoTexParameterf( |
GLenum target, GLenum pname, GLfloat param) { |
TextureRef* texture = texture_manager()->GetTextureInfoForTarget( |