| 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 void Compositor::BeginMainFrame(const cc::BeginFrameArgs& args) { | 490 void Compositor::BeginMainFrame(const cc::BeginFrameArgs& args) { |
| 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::DoShortIdleWork(const cc::BeginFrameArgs& args) {} |
| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 576 for (auto& observer : observer_list_) | 578 for (auto& observer : observer_list_) |
| 577 observer.OnCompositingLockStateChanged(this); | 579 observer.OnCompositingLockStateChanged(this); |
| 578 } | 580 } |
| 579 | 581 |
| 580 void Compositor::CancelCompositorLock() { | 582 void Compositor::CancelCompositorLock() { |
| 581 if (compositor_lock_) | 583 if (compositor_lock_) |
| 582 compositor_lock_->CancelLock(); | 584 compositor_lock_->CancelLock(); |
| 583 } | 585 } |
| 584 | 586 |
| 585 } // namespace ui | 587 } // namespace ui |
| OLD | NEW |