Chromium Code Reviews| Index: cc/scheduler/frame_rate_controller.cc |
| diff --git a/cc/scheduler/frame_rate_controller.cc b/cc/scheduler/frame_rate_controller.cc |
| index 4fcea235a5504da09ba9baaf28bf0055426189e5..78ace9f76d0f337bb894cf205c83a4079b2bd471 100644 |
| --- a/cc/scheduler/frame_rate_controller.cc |
| +++ b/cc/scheduler/frame_rate_controller.cc |
| @@ -21,7 +21,9 @@ class FrameRateControllerTimeSourceAdapter : public TimeSourceClient { |
| } |
| virtual ~FrameRateControllerTimeSourceAdapter() {} |
| - virtual void OnTimerTick() OVERRIDE { frame_rate_controller_->OnTimerTick(); } |
| + virtual void OnTimerTick() OVERRIDE { |
| + frame_rate_controller_->OnTimerTick(); |
| + } |
| private: |
| explicit FrameRateControllerTimeSourceAdapter( |
| @@ -93,6 +95,7 @@ void FrameRateController::SetSwapBuffersCompleteSupported(bool supported) { |
| } |
| void FrameRateController::OnTimerTick() { |
| + TRACE_EVENT0("cc", "FrameRateController::OnTimerTick"); |
| DCHECK(active_); |
| // Check if we have too many frames in flight. |
| @@ -100,8 +103,9 @@ void FrameRateController::OnTimerTick() { |
| max_frames_pending_ && num_frames_pending_ >= max_frames_pending_; |
| TRACE_COUNTER_ID1("cc", "ThrottledCompositor", thread_, throttled); |
| - if (client_) |
| - client_->BeginFrame(throttled); |
| + if (client_) { |
| + client_->FrameRateControllerTick(throttled); |
| + } |
| if (swap_buffers_complete_supported_ && !is_time_source_throttling_ && |
| !throttled) |
| @@ -115,9 +119,11 @@ void FrameRateController::PostManualTick() { |
| } |
| } |
| -void FrameRateController::ManualTick() { OnTimerTick(); } |
| +void FrameRateController::ManualTick() { |
| + OnTimerTick(); |
| +} |
| -void FrameRateController::DidSwapBuffers() { |
| +void FrameRateController::WillSwapBuffers() { |
|
brianderson
2013/06/01 04:30:29
This now corresponds to a BeginFrame rather than a
|
| if (swap_buffers_complete_supported_) |
| num_frames_pending_++; |
| else if (!is_time_source_throttling_) |