| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <deque> | 10 #include <deque> |
| (...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 495 } | 495 } |
| 496 | 496 |
| 497 void Compositor::DidCommit() { | 497 void Compositor::DidCommit() { |
| 498 DCHECK(!IsLocked()); | 498 DCHECK(!IsLocked()); |
| 499 for (auto& observer : observer_list_) | 499 for (auto& observer : observer_list_) |
| 500 observer.OnCompositingDidCommit(this); | 500 observer.OnCompositingDidCommit(this); |
| 501 } | 501 } |
| 502 | 502 |
| 503 void Compositor::DidReceiveCompositorFrameAck() { | 503 void Compositor::DidReceiveCompositorFrameAck() { |
| 504 ++activated_frame_count_; | 504 ++activated_frame_count_; |
| 505 for (auto& observer : observer_list_) |
| 506 observer.OnCompositingEnded(this); |
| 505 } | 507 } |
| 506 | 508 |
| 507 void Compositor::DidSubmitCompositorFrame() { | 509 void Compositor::DidSubmitCompositorFrame() { |
| 508 base::TimeTicks start_time = base::TimeTicks::Now(); | 510 base::TimeTicks start_time = base::TimeTicks::Now(); |
| 509 for (auto& observer : observer_list_) | 511 for (auto& observer : observer_list_) |
| 510 observer.OnCompositingStarted(this, start_time); | 512 observer.OnCompositingStarted(this, start_time); |
| 511 } | 513 } |
| 512 | 514 |
| 513 void Compositor::SetOutputIsSecure(bool output_is_secure) { | 515 void Compositor::SetOutputIsSecure(bool output_is_secure) { |
| 514 if (context_factory_private_) | 516 if (context_factory_private_) |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 570 void Compositor::TimeoutLocks() { | 572 void Compositor::TimeoutLocks() { |
| 571 // Make a copy, we're going to cause |active_locks_| to become | 573 // Make a copy, we're going to cause |active_locks_| to become |
| 572 // empty. | 574 // empty. |
| 573 std::vector<CompositorLock*> locks = active_locks_; | 575 std::vector<CompositorLock*> locks = active_locks_; |
| 574 for (auto* lock : locks) | 576 for (auto* lock : locks) |
| 575 lock->TimeoutLock(); | 577 lock->TimeoutLock(); |
| 576 DCHECK(active_locks_.empty()); | 578 DCHECK(active_locks_.empty()); |
| 577 } | 579 } |
| 578 | 580 |
| 579 } // namespace ui | 581 } // namespace ui |
| OLD | NEW |