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

Unified Diff: gpu/command_buffer/client/gles2_implementation.cc

Issue 1241433003: Rebind EGL context to flush driver caches. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/client/gles2_implementation.cc
diff --git a/gpu/command_buffer/client/gles2_implementation.cc b/gpu/command_buffer/client/gles2_implementation.cc
index fbd0f182d1ae46b6a458ebbff7f2f01ca4b42bb7..2e7541ed2106716351cabc361483876a74132c62 100644
--- a/gpu/command_buffer/client/gles2_implementation.cc
+++ b/gpu/command_buffer/client/gles2_implementation.cc
@@ -327,9 +327,16 @@ void GLES2Implementation::SetAggressivelyFreeResources(
"aggressively_free_resources", aggressively_free_resources);
aggressively_free_resources_ = aggressively_free_resources;
- // ShallowFlushCHROMIUM will free resources if |aggressively_free_resources_|
- // is false.
- ShallowFlushCHROMIUM();
+ if (aggressively_free_resources_) {
piman 2015/07/13 22:48:07 aggressively_free_resources_ && HaveRingBuffer()
piman 2015/07/13 22:48:48 aggressively_free_resources_ && helper_->HaveRingB
ericrk 2015/07/13 23:07:52 ah, good point
+ // Ensure that we clean up as much cache memory as possible and fully flush.
+ FlushDriverCachesCHROMIUM();
+
+ // Flush will delete transfer buffer resources if
+ // |aggressively_free_resources_| is true.
+ Flush();
+ } else {
+ ShallowFlushCHROMIUM();
+ }
}
void GLES2Implementation::WaitForCmd() {
« no previous file with comments | « gpu/command_buffer/client/gles2_cmd_helper_autogen.h ('k') | gpu/command_buffer/client/gles2_implementation_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698