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

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

Issue 2761093002: Instrument ContextCacheController::OnIdle for postmortem reports
Patch Set: 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
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..0ba8908fb6f8c9bf241ae42e85f6170c3a4ba724 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"
@@ -419,6 +420,10 @@ void GLES2Implementation::SetAggressivelyFreeResources(
aggressively_free_resources_ = aggressively_free_resources;
if (aggressively_free_resources_ && helper_->HaveRingBuffer()) {
+ // TODO(manzagop): remove ScopedActivity once crbug.com/703342 is fixed.
+ base::debug::ScopedActivity activity_flush(0, 0,
bcwhite 2017/03/21 12:34:38 Do you want an ID for the second parameter to dist
manzagop (departed) 2017/03/21 14:00:23 Done. Here and below.
+ aggressively_free_resources);
+
// Ensure that we clean up as much cache memory as possible and fully flush.
FlushDriverCachesCHROMIUM();
@@ -426,6 +431,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, 0, aggressively_free_resources);
ShallowFlushCHROMIUM();
}
}
« cc/output/context_cache_controller.cc ('K') | « cc/output/context_cache_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698