| 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 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 } | 294 } |
| 295 | 295 |
| 296 void Compositor::BeginMainFrame(const cc::BeginFrameArgs& args) { | 296 void Compositor::BeginMainFrame(const cc::BeginFrameArgs& args) { |
| 297 FOR_EACH_OBSERVER(CompositorAnimationObserver, | 297 FOR_EACH_OBSERVER(CompositorAnimationObserver, |
| 298 animation_observer_list_, | 298 animation_observer_list_, |
| 299 OnAnimationStep(args.frame_time)); | 299 OnAnimationStep(args.frame_time)); |
| 300 if (animation_observer_list_.might_have_observers()) | 300 if (animation_observer_list_.might_have_observers()) |
| 301 host_->SetNeedsAnimate(); | 301 host_->SetNeedsAnimate(); |
| 302 } | 302 } |
| 303 | 303 |
| 304 void Compositor::BeginMainFrameNoLongerRequired() { |
| 305 // TODO(rmcilroy): Should we do anything here? |
| 306 } |
| 307 |
| 304 void Compositor::Layout() { | 308 void Compositor::Layout() { |
| 305 // We're sending damage that will be addressed during this composite | 309 // We're sending damage that will be addressed during this composite |
| 306 // cycle, so we don't need to schedule another composite to address it. | 310 // cycle, so we don't need to schedule another composite to address it. |
| 307 disable_schedule_composite_ = true; | 311 disable_schedule_composite_ = true; |
| 308 if (root_layer_) | 312 if (root_layer_) |
| 309 root_layer_->SendDamagedRects(); | 313 root_layer_->SendDamagedRects(); |
| 310 disable_schedule_composite_ = false; | 314 disable_schedule_composite_ = false; |
| 311 } | 315 } |
| 312 | 316 |
| 313 void Compositor::RequestNewOutputSurface() { | 317 void Compositor::RequestNewOutputSurface() { |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 observer_list_, | 405 observer_list_, |
| 402 OnCompositingLockStateChanged(this)); | 406 OnCompositingLockStateChanged(this)); |
| 403 } | 407 } |
| 404 | 408 |
| 405 void Compositor::CancelCompositorLock() { | 409 void Compositor::CancelCompositorLock() { |
| 406 if (compositor_lock_) | 410 if (compositor_lock_) |
| 407 compositor_lock_->CancelLock(); | 411 compositor_lock_->CancelLock(); |
| 408 } | 412 } |
| 409 | 413 |
| 410 } // namespace ui | 414 } // namespace ui |
| OLD | NEW |