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

Unified Diff: gpu/command_buffer/client/gles2_implementation.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 | « cc/output/context_cache_controller.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 fde1339e7f578cf12ab79fbbca90c78acff92b50..ab0285e31e263c1f1a7095ffd8c6997a257cbe21 100644
--- a/gpu/command_buffer/client/gles2_implementation.cc
+++ b/gpu/command_buffer/client/gles2_implementation.cc
@@ -20,6 +20,7 @@
#include "base/atomic_sequence_num.h"
#include "base/bits.h"
#include "base/compiler_specific.h"
+#include "base/debug/activity_tracker.h"
#include "base/numerics/safe_math.h"
#include "base/strings/string_split.h"
#include "base/strings/stringprintf.h"
@@ -418,7 +419,15 @@ void GLES2Implementation::SetAggressivelyFreeResources(
"aggressively_free_resources", aggressively_free_resources);
aggressively_free_resources_ = aggressively_free_resources;
+ // TODO(manzagop): remove ScopedActivity once crbug.com/703342 is fixed.
+ const uint32_t kActivityId =
+ 0x92094cf4; // SHA1(GLES2Implementation::SetAggressivelyFreeResources)
+
if (aggressively_free_resources_ && helper_->HaveRingBuffer()) {
+ // TODO(manzagop): remove ScopedActivity once crbug.com/703342 is fixed.
+ base::debug::ScopedActivity activity_flush(0, kActivityId,
+ aggressively_free_resources);
+
// Ensure that we clean up as much cache memory as possible and fully flush.
FlushDriverCachesCHROMIUM();
@@ -426,6 +435,9 @@ void GLES2Implementation::SetAggressivelyFreeResources(
// |aggressively_free_resources_| is true.
Flush();
} else {
+ // TODO(manzagop): remove ScopedActivity once crbug.com/703342 is fixed.
+ base::debug::ScopedActivity activity_shallow_flush(
+ 0, kActivityId + 1, aggressively_free_resources);
ShallowFlushCHROMIUM();
}
}
« no previous file with comments | « cc/output/context_cache_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698