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