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 3f7084692ea84bf04702ae486210b8d23a2cbd26..b62a44f28c75ca4be07817ea19ddbb9e5161c4fe 100644 |
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc |
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc |
@@ -1103,6 +1103,8 @@ class GLES2DecoderImpl : public GLES2Decoder, |
void DoLoseContextCHROMIUM(GLenum current, GLenum other); |
+ void DoFlushDriverCachesCHROMIUM(void); |
+ |
void DoMatrixLoadfCHROMIUM(GLenum matrix_mode, const GLfloat* matrix); |
void DoMatrixLoadIdentityCHROMIUM(GLenum matrix_mode); |
@@ -13275,6 +13277,15 @@ void GLES2DecoderImpl::DoLoseContextCHROMIUM(GLenum current, GLenum other) { |
reset_by_robustness_extension_ = true; |
} |
+void GLES2DecoderImpl::DoFlushDriverCachesCHROMIUM(void) { |
+ // On Adreno Android devices we need to use a workaround to force caches to |
+ // clear. |
+ if (feature_info_->workarounds().unbind_egl_context_to_flush_driver_caches) { |
+ context_->ReleaseCurrent(nullptr); |
+ context_->MakeCurrent(surface_.get()); |
+ } |
+} |
+ |
void GLES2DecoderImpl::DoMatrixLoadfCHROMIUM(GLenum matrix_mode, |
const GLfloat* matrix) { |
DCHECK(matrix_mode == GL_PATH_PROJECTION_CHROMIUM || |