OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ui/compositor/compositor.h" | 5 #include "ui/compositor/compositor.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <deque> | 8 #include <deque> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 void Compositor::ScheduleAnimation() { | 392 void Compositor::ScheduleAnimation() { |
393 ScheduleComposite(); | 393 ScheduleComposite(); |
394 } | 394 } |
395 | 395 |
396 void Compositor::DidPostSwapBuffers() { | 396 void Compositor::DidPostSwapBuffers() { |
397 DCHECK(!compositor_thread_loop_.get()); | 397 DCHECK(!compositor_thread_loop_.get()); |
398 DCHECK_EQ(swap_state_, SWAP_NONE); | 398 DCHECK_EQ(swap_state_, SWAP_NONE); |
399 swap_state_ = SWAP_POSTED; | 399 swap_state_ = SWAP_POSTED; |
400 } | 400 } |
401 | 401 |
| 402 void Compositor::DidCompletePageScaleAnimation() {} |
| 403 |
402 void Compositor::DidAbortSwapBuffers() { | 404 void Compositor::DidAbortSwapBuffers() { |
403 if (!compositor_thread_loop_.get()) { | 405 if (!compositor_thread_loop_.get()) { |
404 if (swap_state_ == SWAP_POSTED) { | 406 if (swap_state_ == SWAP_POSTED) { |
405 NotifyEnd(); | 407 NotifyEnd(); |
406 swap_state_ = SWAP_COMPLETED; | 408 swap_state_ = SWAP_COMPLETED; |
407 } | 409 } |
408 } | 410 } |
409 | 411 |
410 FOR_EACH_OBSERVER(CompositorObserver, | 412 FOR_EACH_OBSERVER(CompositorObserver, |
411 observer_list_, | 413 observer_list_, |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
458 // Call ScheduleDraw() instead of Draw() in order to allow other | 460 // Call ScheduleDraw() instead of Draw() in order to allow other |
459 // CompositorObservers to be notified before starting another | 461 // CompositorObservers to be notified before starting another |
460 // draw cycle. | 462 // draw cycle. |
461 ScheduleDraw(); | 463 ScheduleDraw(); |
462 } | 464 } |
463 FOR_EACH_OBSERVER( | 465 FOR_EACH_OBSERVER( |
464 CompositorObserver, observer_list_, OnCompositingEnded(this)); | 466 CompositorObserver, observer_list_, OnCompositingEnded(this)); |
465 } | 467 } |
466 | 468 |
467 } // namespace ui | 469 } // namespace ui |
OLD | NEW |