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

Side by Side Diff: ui/compositor/layer_animator_collection.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
« no previous file with comments | « ui/compositor/layer_animator_collection.h ('k') | ui/compositor/layer_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/layer_animator_collection.h" 5 #include "ui/compositor/layer_animator_collection.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "ui/compositor/compositor.h" 10 #include "ui/compositor/compositor.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 iter != list.end(); 50 iter != list.end();
51 ++iter) { 51 ++iter) {
52 // Make sure the animator is still valid. 52 // Make sure the animator is still valid.
53 if (animators_.count(*iter) > 0) 53 if (animators_.count(*iter) > 0)
54 (*iter)->Step(now); 54 (*iter)->Step(now);
55 } 55 }
56 if (!HasActiveAnimators() && compositor_) 56 if (!HasActiveAnimators() && compositor_)
57 compositor_->RemoveAnimationObserver(this); 57 compositor_->RemoveAnimationObserver(this);
58 } 58 }
59 59
60 void LayerAnimatorCollection::OnCompositingShuttingDown(
61 Compositor* compositor) {
62 if (compositor_ && compositor_->HasAnimationObserver(this)) {
ajuma 2015/05/29 21:57:10 Is HasAnimationObserver necessary here? The call t
63 compositor_->RemoveAnimationObserver(this);
64 }
65 compositor_ = nullptr;
66 }
67
60 } // namespace ui 68 } // namespace ui
OLDNEW
« no previous file with comments | « ui/compositor/layer_animator_collection.h ('k') | ui/compositor/layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698