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

Unified Diff: ui/compositor/layer.cc

Issue 514123002: Manual fixups in compositor code scoped_refptr operator T* removal. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: ui/compositor/layer.cc
diff --git a/ui/compositor/layer.cc b/ui/compositor/layer.cc
index f3551f7687babb3d1914b669ca8e32686491ddfb..8e49ccb117ddd670c97379688bec96460a0aeeb7 100644
--- a/ui/compositor/layer.cc
+++ b/ui/compositor/layer.cc
@@ -659,10 +659,14 @@ void Layer::SendDamagedRects() {
}
void Layer::CompleteAllAnimations() {
- std::vector<scoped_refptr<LayerAnimator> > animators;
+ typedef std::vector<scoped_refptr<LayerAnimator> > LayerAnimatorVector;
+ LayerAnimatorVector animators;
CollectAnimators(&animators);
- std::for_each(animators.begin(), animators.end(),
- std::mem_fun(&LayerAnimator::StopAnimating));
danakj 2014/08/28 16:50:42 isn't mem_fun going to deref the iterator also? wh
dcheng 2014/08/28 17:21:18 I believe mem_fun actually expects a pointer. for_
+ for (LayerAnimatorVector::const_iterator it = animators.begin();
+ it != animators.end();
+ ++it) {
+ (*it)->StopAnimating();
+ }
}
void Layer::SuppressPaint() {
« cc/resources/tile_manager.cc ('K') | « cc/trees/layer_tree_host_unittest_no_message_loop.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698