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