| 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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 | 238 |
| 239 void Compositor::Layout() { | 239 void Compositor::Layout() { |
| 240 // We're sending damage that will be addressed during this composite | 240 // We're sending damage that will be addressed during this composite |
| 241 // cycle, so we don't need to schedule another composite to address it. | 241 // cycle, so we don't need to schedule another composite to address it. |
| 242 disable_schedule_composite_ = true; | 242 disable_schedule_composite_ = true; |
| 243 if (root_layer_) | 243 if (root_layer_) |
| 244 root_layer_->SendDamagedRects(); | 244 root_layer_->SendDamagedRects(); |
| 245 disable_schedule_composite_ = false; | 245 disable_schedule_composite_ = false; |
| 246 } | 246 } |
| 247 | 247 |
| 248 scoped_ptr<cc::OutputSurface> Compositor::CreateOutputSurface(bool fallback) { | 248 void Compositor::RequestNewOutputSurface(bool fallback) { |
| 249 return context_factory_->CreateOutputSurface(this, fallback); | 249 host_->SetOutputSurface( |
| 250 context_factory_->CreateOutputSurface(this, fallback)); |
| 250 } | 251 } |
| 251 | 252 |
| 252 void Compositor::DidCommit() { | 253 void Compositor::DidCommit() { |
| 253 DCHECK(!IsLocked()); | 254 DCHECK(!IsLocked()); |
| 254 FOR_EACH_OBSERVER(CompositorObserver, | 255 FOR_EACH_OBSERVER(CompositorObserver, |
| 255 observer_list_, | 256 observer_list_, |
| 256 OnCompositingDidCommit(this)); | 257 OnCompositingDidCommit(this)); |
| 257 } | 258 } |
| 258 | 259 |
| 259 void Compositor::DidCommitAndDrawFrame() { | 260 void Compositor::DidCommitAndDrawFrame() { |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 observer_list_, | 310 observer_list_, |
| 310 OnCompositingLockStateChanged(this)); | 311 OnCompositingLockStateChanged(this)); |
| 311 } | 312 } |
| 312 | 313 |
| 313 void Compositor::CancelCompositorLock() { | 314 void Compositor::CancelCompositorLock() { |
| 314 if (compositor_lock_) | 315 if (compositor_lock_) |
| 315 compositor_lock_->CancelLock(); | 316 compositor_lock_->CancelLock(); |
| 316 } | 317 } |
| 317 | 318 |
| 318 } // namespace ui | 319 } // namespace ui |
| OLD | NEW |