| Index: cc/output/output_surface.cc
|
| diff --git a/cc/output/output_surface.cc b/cc/output/output_surface.cc
|
| index a485984d69fc5f44c182abb7f8553ef03d2454bc..840b7d7f2893e9f8b9a2a71cbef158089d769efe 100644
|
| --- a/cc/output/output_surface.cc
|
| +++ b/cc/output/output_surface.cc
|
| @@ -4,6 +4,7 @@
|
|
|
| #include "cc/output/output_surface.h"
|
|
|
| +#include <algorithm>
|
| #include <set>
|
| #include <string>
|
| #include <vector>
|
| @@ -216,8 +217,11 @@ void OutputSurface::BeginFrame(const BeginFrameArgs& args) {
|
| }
|
| }
|
|
|
| -base::TimeDelta OutputSurface::RetroactiveBeginFramePeriod() {
|
| - return BeginFrameArgs::DefaultRetroactiveBeginFramePeriod();
|
| +base::TimeTicks OutputSurface::RetroactiveBeginFrameDeadline() {
|
| + base::TimeTicks alternative_deadline =
|
| + skipped_begin_frame_args_.frame_time +
|
| + BeginFrameArgs::DefaultRetroactiveBeginFramePeriod();
|
| + return std::max(skipped_begin_frame_args_.deadline, alternative_deadline);
|
| }
|
|
|
| void OutputSurface::PostCheckForRetroactiveBeginFrame() {
|
| @@ -235,14 +239,8 @@ void OutputSurface::PostCheckForRetroactiveBeginFrame() {
|
| void OutputSurface::CheckForRetroactiveBeginFrame() {
|
| TRACE_EVENT0("cc", "OutputSurface::CheckForRetroactiveBeginFrame");
|
| check_for_retroactive_begin_frame_pending_ = false;
|
| - base::TimeTicks now = base::TimeTicks::Now();
|
| - base::TimeTicks alternative_deadline =
|
| - skipped_begin_frame_args_.frame_time +
|
| - RetroactiveBeginFramePeriod();
|
| - if (now < skipped_begin_frame_args_.deadline ||
|
| - now < alternative_deadline) {
|
| + if (base::TimeTicks::Now() < RetroactiveBeginFrameDeadline())
|
| BeginFrame(skipped_begin_frame_args_);
|
| - }
|
| }
|
|
|
| void OutputSurface::DidSwapBuffers() {
|
|
|