| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "cc/surfaces/display_scheduler.h" | 5 #include "cc/surfaces/display_scheduler.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
| (...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 AttemptDrawAndSwap(); | 353 AttemptDrawAndSwap(); |
| 354 begin_frame_source_->DidFinishFrame(this, 0); | 354 begin_frame_source_->DidFinishFrame(this, 0); |
| 355 } | 355 } |
| 356 | 356 |
| 357 void DisplayScheduler::DidSwapBuffers() { | 357 void DisplayScheduler::DidSwapBuffers() { |
| 358 pending_swaps_++; | 358 pending_swaps_++; |
| 359 TRACE_EVENT_ASYNC_BEGIN1("cc", "DisplayScheduler:pending_swaps", this, | 359 TRACE_EVENT_ASYNC_BEGIN1("cc", "DisplayScheduler:pending_swaps", this, |
| 360 "pending_frames", pending_swaps_); | 360 "pending_frames", pending_swaps_); |
| 361 } | 361 } |
| 362 | 362 |
| 363 void DisplayScheduler::DidSwapBuffersComplete() { | 363 void DisplayScheduler::DidReceiveSwapBuffersAck() { |
| 364 pending_swaps_--; | 364 pending_swaps_--; |
| 365 TRACE_EVENT_ASYNC_END1("cc", "DisplayScheduler:pending_swaps", this, | 365 TRACE_EVENT_ASYNC_END1("cc", "DisplayScheduler:pending_swaps", this, |
| 366 "pending_frames", pending_swaps_); | 366 "pending_frames", pending_swaps_); |
| 367 ScheduleBeginFrameDeadline(); | 367 ScheduleBeginFrameDeadline(); |
| 368 } | 368 } |
| 369 | 369 |
| 370 } // namespace cc | 370 } // namespace cc |
| OLD | NEW |