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

Unified Diff: cc/debug/devtools_instrumentation.h

Issue 60353002: cc: add DevTools instrumentation for impl-side frames (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed scheduler_unittest.cc Created 7 years, 1 month 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 | cc/scheduler/scheduler.h » ('j') | cc/scheduler/scheduler.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/debug/devtools_instrumentation.h
diff --git a/cc/debug/devtools_instrumentation.h b/cc/debug/devtools_instrumentation.h
index eea9e62f02aa0881e0e9ae1ee7a909f9c139f198..9d01599c8a345b87ae222bb8e792ca604f501d9b 100644
--- a/cc/debug/devtools_instrumentation.h
+++ b/cc/debug/devtools_instrumentation.h
@@ -12,12 +12,15 @@ namespace devtools_instrumentation {
namespace internal {
const char kCategory[] = "cc,devtools";
+const char kFrameId[] = "frameId";
const char kLayerId[] = "layerId";
const char kLayerTreeId[] = "layerTreeId";
const char kPixelRefId[] = "pixelRefId";
const char kImageDecodeTask[] = "ImageDecodeTask";
-}
+const char kBeginFrame[] = "BeginFrame";
+const char kCommitMainThreadFrame[] = "CommitMainThreadFrame";
+} // namespace internal
const char kPaintLayer[] = "PaintLayer";
const char kRasterTask[] = "RasterTask";
@@ -84,6 +87,21 @@ struct ScopedLayerObjectTracker
DISALLOW_COPY_AND_ASSIGN(ScopedLayerObjectTracker);
};
+inline void didCommitMainThreadFrame(uint64 tree_id, int frame_id) {
nduca 2013/11/06 19:05:12 remind me what the tree id does?
caseq 2013/11/07 06:36:26 It's actually LTH id -- we use it on the Timeline'
+ TRACE_EVENT_INSTANT2(internal::kCategory,
+ internal::kCommitMainThreadFrame,
+ TRACE_EVENT_SCOPE_THREAD,
+ internal::kLayerTreeId, tree_id,
+ internal::kFrameId, frame_id);
+}
+
+inline void didBeginFrame(uint64 tree_id) {
+ TRACE_EVENT_INSTANT1(internal::kCategory,
+ internal::kBeginFrame,
+ TRACE_EVENT_SCOPE_THREAD,
+ internal::kLayerTreeId, tree_id);
+}
+
} // namespace devtools_instrumentation
} // namespace cc
« no previous file with comments | « no previous file | cc/scheduler/scheduler.h » ('j') | cc/scheduler/scheduler.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698