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