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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 | 176 |
177 Compositor::~Compositor() { | 177 Compositor::~Compositor() { |
178 TRACE_EVENT0("shutdown", "Compositor::destructor"); | 178 TRACE_EVENT0("shutdown", "Compositor::destructor"); |
179 | 179 |
180 CancelCompositorLock(); | 180 CancelCompositorLock(); |
181 DCHECK(!compositor_lock_); | 181 DCHECK(!compositor_lock_); |
182 | 182 |
183 FOR_EACH_OBSERVER(CompositorObserver, observer_list_, | 183 FOR_EACH_OBSERVER(CompositorObserver, observer_list_, |
184 OnCompositingShuttingDown(this)); | 184 OnCompositingShuttingDown(this)); |
185 | 185 |
| 186 FOR_EACH_OBSERVER(CompositorAnimationObserver, animation_observer_list_, |
| 187 OnCompositingShuttingDown(this)); |
| 188 |
186 DCHECK(begin_frame_observer_list_.empty()); | 189 DCHECK(begin_frame_observer_list_.empty()); |
187 | 190 |
188 if (root_layer_) | 191 if (root_layer_) |
189 root_layer_->ResetCompositor(); | 192 root_layer_->ResetCompositor(); |
190 | 193 |
191 // Stop all outstanding draws before telling the ContextFactory to tear | 194 // Stop all outstanding draws before telling the ContextFactory to tear |
192 // down any contexts that the |host_| may rely upon. | 195 // down any contexts that the |host_| may rely upon. |
193 host_.reset(); | 196 host_.reset(); |
194 | 197 |
195 context_factory_->RemoveCompositor(this); | 198 context_factory_->RemoveCompositor(this); |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 observer_list_, | 460 observer_list_, |
458 OnCompositingLockStateChanged(this)); | 461 OnCompositingLockStateChanged(this)); |
459 } | 462 } |
460 | 463 |
461 void Compositor::CancelCompositorLock() { | 464 void Compositor::CancelCompositorLock() { |
462 if (compositor_lock_) | 465 if (compositor_lock_) |
463 compositor_lock_->CancelLock(); | 466 compositor_lock_->CancelLock(); |
464 } | 467 } |
465 | 468 |
466 } // namespace ui | 469 } // namespace ui |
OLD | NEW |