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 dd08df8214eedc278f3173f43e2a6d03981b2d13..5cdf63163626eb7dbf06bb691d7f571169671752 100644 |
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc |
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc |
@@ -1098,6 +1098,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); |
@@ -13082,6 +13084,18 @@ void GLES2DecoderImpl::DoLoseContextCHROMIUM(GLenum current, GLenum other) { |
reset_by_robustness_extension_ = true; |
} |
+void GLES2DecoderImpl::DoFlushDriverCachesCHROMIUM(void) { |
+ // Normally, we should just need to call glFinish to flush driver caches. |
+ glFinish(); |
+ |
+ // On Adreno Android devices we need to use a workaround to force more caches |
+ // to clear. |
+ if (feature_info_->workarounds().unbind_egl_context_to_flush_driver_caches) { |
+ context_->MakeCurrent(nullptr); |
piman
2015/07/13 21:25:29
How about context_->ReleaseCurrent() here, instead
ericrk
2015/07/13 22:11:11
good point.
|
+ context_->MakeCurrent(surface_.get()); |
+ } |
+} |
+ |
void GLES2DecoderImpl::DoMatrixLoadfCHROMIUM(GLenum matrix_mode, |
const GLfloat* matrix) { |
DCHECK(matrix_mode == GL_PATH_PROJECTION_CHROMIUM || |