| Index: cc/output/begin_frame_args.cc
|
| diff --git a/cc/output/begin_frame_args.cc b/cc/output/begin_frame_args.cc
|
| index 92901afb1f3d897b37ca374297a8e5bc25463cbc..d21dc0b79d8de35f26f4144523573f9a1fe05d5e 100644
|
| --- a/cc/output/begin_frame_args.cc
|
| +++ b/cc/output/begin_frame_args.cc
|
| @@ -2,6 +2,7 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| +#include "base/json/json_writer.h"
|
| #include "cc/output/begin_frame_args.h"
|
| #include "ui/gfx/frame_time.h"
|
|
|
| @@ -27,6 +28,15 @@ BeginFrameArgs BeginFrameArgs::Create(base::TimeTicks frame_time,
|
| return BeginFrameArgs(frame_time, deadline, interval);
|
| }
|
|
|
| +scoped_ptr<base::Value> BeginFrameArgs::AsValue() const {
|
| + scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue);
|
| + state->SetString("type", "BeginFrameArgs");
|
| + state->SetDouble("frame_time_us", frame_time.ToInternalValue());
|
| + state->SetDouble("deadline_us", deadline.ToInternalValue());
|
| + state->SetDouble("interval_us", interval.InMicroseconds());
|
| + return state.PassAs<base::Value>();
|
| +}
|
| +
|
| BeginFrameArgs BeginFrameArgs::CreateForSynchronousCompositor() {
|
| // For WebView/SynchronousCompositor, we always want to draw immediately,
|
| // so we set the deadline to 0 and guess that the interval is 16 milliseconds.
|
|
|