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

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: Scheduler now uses frame sources, working on scheduler_unittests. 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..1aa38e29b169b9dbb22c6486d74ee1527d8fcdeb 100644
--- a/cc/output/begin_frame_args.h
+++ b/cc/output/begin_frame_args.h
@@ -6,6 +6,7 @@
#define CC_OUTPUT_BEGIN_FRAME_ARGS_H_
#include "base/time/time.h"
+#include "base/values.h"
#include "cc/base/cc_export.h"
namespace cc {
@@ -39,6 +40,15 @@ struct CC_EXPORT BeginFrameArgs {
bool IsValid() const { return interval >= base::TimeDelta(); }
+ scoped_ptr<base::Value> AsValue() const {
+ scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue);
+ state->SetString("type", "BeginFrameArgs");
brianderson 2014/05/07 17:20:16 I don't think we use this "type" pattern anywhere
mithro-old 2014/05/07 22:02:32 I'd really like to have a type field because then
brianderson 2014/05/08 00:55:58 Please split it out to a separate patch, yes. If y
mithro-old 2014/05/09 02:45:58 Done.
+ 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;

Powered by Google App Engine
This is Rietveld 408576698