Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(208)

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder.cc

Issue 1241433003: Rebind EGL context to flush driver caches. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 ||
« no previous file with comments | « gpu/command_buffer/common/gles2_cmd_ids_autogen.h ('k') | gpu/command_buffer/service/gles2_cmd_decoder_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698