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

Unified Diff: cc/debug/frame_timing_tracker.h

Issue 1137823002: Pass collected frame timing events to Blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Missed implementing virtual function on Android html_viewer. Created 5 years, 6 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 3364993197395c32be17c57e32e28445c2136565..7b638d7f8accc1c8886f24112151869361b493ab 100644
--- a/cc/debug/frame_timing_tracker.h
+++ b/cc/debug/frame_timing_tracker.h
@@ -13,9 +13,12 @@
#include "base/memory/scoped_ptr.h"
#include "base/time/time.h"
#include "cc/base/cc_export.h"
+#include "cc/base/delayed_unique_notifier.h"
namespace cc {
+class LayerTreeHostImpl;
+
// This class maintains a history of timestamps and rect IDs to communicate
// frame events back to Blink
// TODO(mpb): Start using this. crbug.com/442554
@@ -30,7 +33,7 @@ class CC_EXPORT FrameTimingTracker {
};
using CompositeTimingSet =
- base::hash_map<int, std::vector<CompositeTimingEvent>>;
+ base::hash_map<int64_t, std::vector<CompositeTimingEvent>>;
struct CC_EXPORT MainFrameTimingEvent {
MainFrameTimingEvent(int frame_id,
@@ -44,9 +47,10 @@ class CC_EXPORT FrameTimingTracker {
};
using MainFrameTimingSet =
- base::hash_map<int, std::vector<MainFrameTimingEvent>>;
+ base::hash_map<int64_t, std::vector<MainFrameTimingEvent>>;
- static scoped_ptr<FrameTimingTracker> Create();
+ static scoped_ptr<FrameTimingTracker> Create(
+ LayerTreeHostImpl* layer_tree_host_impl);
~FrameTimingTracker();
@@ -74,11 +78,16 @@ class CC_EXPORT FrameTimingTracker {
int source_frame_number);
private:
- FrameTimingTracker();
+ explicit FrameTimingTracker(LayerTreeHostImpl* layer_tree_host_impl);
+
+ void PostEvents();
scoped_ptr<CompositeTimingSet> composite_events_;
scoped_ptr<MainFrameTimingSet> main_frame_events_;
+ LayerTreeHostImpl* layer_tree_host_impl_;
+ DelayedUniqueNotifier post_events_notifier_;
+
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