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