| Index: cc/output/output_surface.cc
|
| diff --git a/cc/output/output_surface.cc b/cc/output/output_surface.cc
|
| index bcebeab429013bc938520fba4cee90133ac829df..a8f865cb424541cc967b91fbbf6c6e1d2c2d2733 100644
|
| --- a/cc/output/output_surface.cc
|
| +++ b/cc/output/output_surface.cc
|
| @@ -25,6 +25,7 @@
|
| #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h"
|
| #include "third_party/khronos/GLES2/gl2.h"
|
| #include "third_party/khronos/GLES2/gl2ext.h"
|
| +#include "ui/gfx/frame_time.h"
|
| #include "ui/gfx/rect.h"
|
| #include "ui/gfx/size.h"
|
|
|
| @@ -95,9 +96,12 @@ void OutputSurface::InitializeBeginFrameEmulation(
|
| bool throttle_frame_production,
|
| base::TimeDelta interval) {
|
| if (throttle_frame_production) {
|
| - frame_rate_controller_.reset(
|
| - new FrameRateController(
|
| - DelayBasedTimeSource::Create(interval, task_runner)));
|
| + scoped_refptr<DelayBasedTimeSource> time_source;
|
| + if (gfx::FrameTime::TimestampsAreHighRes())
|
| + time_source = DelayBasedTimeSourceHighRes::Create(interval, task_runner);
|
| + else
|
| + time_source = DelayBasedTimeSource::Create(interval, task_runner);
|
| + frame_rate_controller_.reset(new FrameRateController(time_source));
|
| } else {
|
| frame_rate_controller_.reset(new FrameRateController(task_runner));
|
| }
|
| @@ -198,7 +202,7 @@ void OutputSurface::PostCheckForRetroactiveBeginFrame() {
|
| void OutputSurface::CheckForRetroactiveBeginFrame() {
|
| TRACE_EVENT0("cc", "OutputSurface::CheckForRetroactiveBeginFrame");
|
| check_for_retroactive_begin_frame_pending_ = false;
|
| - if (base::TimeTicks::Now() < RetroactiveBeginFrameDeadline())
|
| + if (gfx::FrameTime::Now() < RetroactiveBeginFrameDeadline())
|
| BeginFrame(skipped_begin_frame_args_);
|
| }
|
|
|
|
|