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

Unified Diff: cc/output/context_cache_controller.cc

Issue 2761093002: Instrument ContextCacheController::OnIdle for postmortem reports
Patch Set: Merge Created 3 years, 9 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
« no previous file with comments | « no previous file | gpu/command_buffer/client/gles2_implementation.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | gpu/command_buffer/client/gles2_implementation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698