Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Side by Side Diff: ui/compositor/compositor.cc

Issue 1147323003: Made the CompositorAnimationObserver class usable (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | ui/compositor/compositor_animation_observer.h » ('j') | ui/compositor/layer_animator_collection.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698