| 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 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 490 DCHECK(!IsLocked()); | 490 DCHECK(!IsLocked()); |
| 491 for (auto& observer : animation_observer_list_) | 491 for (auto& observer : animation_observer_list_) |
| 492 observer.OnAnimationStep(args.frame_time); | 492 observer.OnAnimationStep(args.frame_time); |
| 493 if (animation_observer_list_.might_have_observers()) | 493 if (animation_observer_list_.might_have_observers()) |
| 494 host_->SetNeedsAnimate(); | 494 host_->SetNeedsAnimate(); |
| 495 } | 495 } |
| 496 | 496 |
| 497 void Compositor::BeginMainFrameNotExpectedSoon() { | 497 void Compositor::BeginMainFrameNotExpectedSoon() { |
| 498 } | 498 } |
| 499 | 499 |
| 500 void Compositor::BeginMainFrameNotExpectedUntil(base::TimeTicks time) {} |
| 501 |
| 500 static void SendDamagedRectsRecursive(ui::Layer* layer) { | 502 static void SendDamagedRectsRecursive(ui::Layer* layer) { |
| 501 layer->SendDamagedRects(); | 503 layer->SendDamagedRects(); |
| 502 for (auto* child : layer->children()) | 504 for (auto* child : layer->children()) |
| 503 SendDamagedRectsRecursive(child); | 505 SendDamagedRectsRecursive(child); |
| 504 } | 506 } |
| 505 | 507 |
| 506 void Compositor::UpdateLayerTreeHost() { | 508 void Compositor::UpdateLayerTreeHost() { |
| 507 if (!root_layer()) | 509 if (!root_layer()) |
| 508 return; | 510 return; |
| 509 SendDamagedRectsRecursive(root_layer()); | 511 SendDamagedRectsRecursive(root_layer()); |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 601 void Compositor::TimeoutLocks() { | 603 void Compositor::TimeoutLocks() { |
| 602 // Make a copy, we're going to cause |active_locks_| to become | 604 // Make a copy, we're going to cause |active_locks_| to become |
| 603 // empty. | 605 // empty. |
| 604 std::vector<CompositorLock*> locks = active_locks_; | 606 std::vector<CompositorLock*> locks = active_locks_; |
| 605 for (auto* lock : locks) | 607 for (auto* lock : locks) |
| 606 lock->TimeoutLock(); | 608 lock->TimeoutLock(); |
| 607 DCHECK(active_locks_.empty()); | 609 DCHECK(active_locks_.empty()); |
| 608 } | 610 } |
| 609 | 611 |
| 610 } // namespace ui | 612 } // namespace ui |
| OLD | NEW |