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

Unified Diff: cc/debug/frame_timing_tracker.h

Issue 914403003: cc: Add main frame timing info to frame timing tracker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 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 | cc/debug/frame_timing_tracker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/debug/frame_timing_tracker.h
diff --git a/cc/debug/frame_timing_tracker.h b/cc/debug/frame_timing_tracker.h
index 019fe794472a10616941312b09c568c3273e6642..3364993197395c32be17c57e32e28445c2136565 100644
--- a/cc/debug/frame_timing_tracker.h
+++ b/cc/debug/frame_timing_tracker.h
@@ -32,6 +32,20 @@ class CC_EXPORT FrameTimingTracker {
using CompositeTimingSet =
base::hash_map<int, std::vector<CompositeTimingEvent>>;
+ struct CC_EXPORT MainFrameTimingEvent {
+ MainFrameTimingEvent(int frame_id,
+ base::TimeTicks timestamp,
+ base::TimeTicks end_time);
+ ~MainFrameTimingEvent();
+
+ int frame_id;
+ base::TimeTicks timestamp;
+ base::TimeTicks end_time;
+ };
+
+ using MainFrameTimingSet =
+ base::hash_map<int, std::vector<MainFrameTimingEvent>>;
+
static scoped_ptr<FrameTimingTracker> Create();
~FrameTimingTracker();
@@ -41,7 +55,11 @@ class CC_EXPORT FrameTimingTracker {
// [ {f_id1,r_id1,t1}, {f_id2,r_id1,t2}, {f_id3,r_id2,t3} ]
// ====>
// [ {r_id1,<{f_id1,t1},{f_id2,t2}>}, {r_id2,<{f_id3,t3}>} ]
- scoped_ptr<CompositeTimingSet> GroupCountsByRectId();
+ scoped_ptr<CompositeTimingSet> GroupCompositeCountsByRectId();
+
+ // This routine takes all of the individual MainFrameEvents stored in the
+ // tracker and collects them by "rect_id", as in the example below.
+ scoped_ptr<MainFrameTimingSet> GroupMainFrameCountsByRectId();
// This routine takes a timestamp and an array of frame_id,rect_id pairs
// and generates CompositeTimingEvents (frame_id, timestamp) and adds them to
@@ -50,10 +68,16 @@ class CC_EXPORT FrameTimingTracker {
void SaveTimeStamps(base::TimeTicks timestamp,
const std::vector<FrameAndRectIds>& frame_ids);
+ void SaveMainFrameTimeStamps(const std::vector<int64_t>& request_ids,
+ base::TimeTicks main_frame_time,
+ base::TimeTicks end_time,
+ int source_frame_number);
+
private:
FrameTimingTracker();
scoped_ptr<CompositeTimingSet> composite_events_;
+ scoped_ptr<MainFrameTimingSet> main_frame_events_;
DISALLOW_COPY_AND_ASSIGN(FrameTimingTracker);
};
« no previous file with comments | « no previous file | cc/debug/frame_timing_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698