Index: cc/output/context_cache_controller.cc |
diff --git a/cc/output/context_cache_controller.cc b/cc/output/context_cache_controller.cc |
index 79e85b3e0336146e41e82aaaf4d0463e21d2e141..096242b94572ca52d395a7348a6e783926f8bc68 100644 |
--- a/cc/output/context_cache_controller.cc |
+++ b/cc/output/context_cache_controller.cc |
@@ -5,6 +5,7 @@ |
#include "cc/output/context_cache_controller.h" |
#include "base/bind.h" |
+#include "base/debug/activity_tracker.h" |
#include "base/logging.h" |
#include "base/memory/ptr_util.h" |
#include "base/synchronization/lock.h" |
@@ -158,8 +159,14 @@ void ContextCacheController::OnIdle(uint32_t idle_generation) { |
return; |
} |
- if (gr_context_) |
+ if (gr_context_) { |
+ // TODO(manzagop): remove ScopedActivity once crbug.com/703342 is fixed. |
+ const uint32_t kActivityId = |
+ 0x0e38f5d0; // SHA1(ContextCacheController::OnIdle) |
+ base::debug::ScopedActivity activity_free(0, kActivityId, 0); |
+ |
gr_context_->freeGpuResources(); |
+ } |
// Toggle SetAggressivelyFreeResources to drop command buffer data. |
context_support_->SetAggressivelyFreeResources(true); |