diff options
author | brianderson@chromium.org <brianderson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-31 00:54:35 +0000 |
---|---|---|
committer | brianderson@chromium.org <brianderson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-31 00:54:35 +0000 |
commit | 44e81cf8f61602780359789d86f249903d6daa97 (patch) | |
tree | 2315ef9a058875874c7de0a72f89187e3800c84c /gpu | |
parent | 55e4b3b013a4b7080323676cd8336de036e1677d (diff) | |
download | chromium_src-44e81cf8f61602780359789d86f249903d6daa97.zip chromium_src-44e81cf8f61602780359789d86f249903d6daa97.tar.gz chromium_src-44e81cf8f61602780359789d86f249903d6daa97.tar.bz2 |
cc: Flush after context switch (Qualcomm WAR)
Without this flush, we see flashing on Nexus 4 when opening a new tab.
BUG=169910
NOTRY=True
Review URL: https://codereview.chromium.org/12079065
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@179754 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu')
-rw-r--r-- | gpu/command_buffer/service/feature_info.cc | 2 | ||||
-rw-r--r-- | gpu/command_buffer/service/feature_info.h | 1 | ||||
-rw-r--r-- | gpu/command_buffer/service/gles2_cmd_decoder.cc | 3 |
3 files changed, 6 insertions, 0 deletions
diff --git a/gpu/command_buffer/service/feature_info.cc b/gpu/command_buffer/service/feature_info.cc index 8d7320d..d48912a 100644 --- a/gpu/command_buffer/service/feature_info.cc +++ b/gpu/command_buffer/service/feature_info.cc @@ -92,6 +92,7 @@ FeatureInfo::Workarounds::Workarounds() set_texture_filter_before_generating_mipmap(false), use_current_program_after_successful_link(false), restore_scissor_on_fbo_change(false), + flush_on_context_switch(false), max_texture_size(0), max_cube_map_texture_size(0) { } @@ -601,6 +602,7 @@ void FeatureInfo::AddFeatures() { if (is_qualcomm) { workarounds_.restore_scissor_on_fbo_change = true; + workarounds_.flush_on_context_switch = true; } #if defined(OS_MACOSX) diff --git a/gpu/command_buffer/service/feature_info.h b/gpu/command_buffer/service/feature_info.h index 29fcd89..81a32eb 100644 --- a/gpu/command_buffer/service/feature_info.h +++ b/gpu/command_buffer/service/feature_info.h @@ -54,6 +54,7 @@ class GPU_EXPORT FeatureInfo : public base::RefCounted<FeatureInfo> { bool set_texture_filter_before_generating_mipmap; bool use_current_program_after_successful_link; bool restore_scissor_on_fbo_change; + bool flush_on_context_switch; // Note: 0 here means use driver limit. GLint max_texture_size; diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc index 0547749..3b441a2 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc @@ -2737,6 +2737,9 @@ bool GLES2DecoderImpl::MakeCurrent() { framebuffer_manager()->IncFramebufferStateChangeCount(); } + if (workarounds().flush_on_context_switch) + glFlush(); + return true; } |