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

Unified Diff: cc/output/begin_frame_args.h

Issue 267783004: Refactoring the way begin frame sources inside scheduler work. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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: cc/output/begin_frame_args.h
diff --git a/cc/output/begin_frame_args.h b/cc/output/begin_frame_args.h
index 025a4075c25e6b84ab9597dabac7e5c83b34ea1b..62554ca4e774a61596308edda36ed725b3bd5871 100644
--- a/cc/output/begin_frame_args.h
+++ b/cc/output/begin_frame_args.h
@@ -39,6 +39,15 @@ struct CC_EXPORT BeginFrameArgs {
bool IsValid() const { return interval >= base::TimeDelta(); }
+ virtual scoped_ptr<base::Value> AsValue() const {
+ scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue);
+ state->SetString("type", "BeginFrameArgs");
+ state->SetInteger("frame_time_us", frame_time.ToInternalValue());
+ state->SetInteger("deadline_us", deadline_.ToInternalValue());
+ state->SetInteger("interval_us", interval_.InMicroseconds());
+ return state.PassAs<base::Value>();
+ }
+
base::TimeTicks frame_time;
base::TimeTicks deadline;
base::TimeDelta interval;
« no previous file with comments | « cc/cc.gyp ('k') | cc/scheduler/frame_source.cc » ('j') | cc/scheduler/frame_source.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698