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

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

Issue 1539583003: Convert Pass()→std::move() in ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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_unittest.cc ('k') | ui/compositor/test/in_process_context_factory.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 (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/scoped_layer_animation_settings.h" 5 #include "ui/compositor/scoped_layer_animation_settings.h"
6 6
7 #include "ui/compositor/layer.h" 7 #include "ui/compositor/layer.h"
8 #include "ui/compositor/layer_animation_observer.h" 8 #include "ui/compositor/layer_animation_observer.h"
9 #include "ui/compositor/layer_animation_sequence.h" 9 #include "ui/compositor/layer_animation_sequence.h"
10 #include "ui/compositor/layer_animator.h" 10 #include "ui/compositor/layer_animator.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 "Inverse supported only for single element sequences."; 60 "Inverse supported only for single element sequences.";
61 61
62 LayerAnimationElement* element = sequence->FirstElement(); 62 LayerAnimationElement* element = sequence->FirstElement();
63 DCHECK_EQ(static_cast<LayerAnimationElement::AnimatableProperties>( 63 DCHECK_EQ(static_cast<LayerAnimationElement::AnimatableProperties>(
64 LayerAnimationElement::TRANSFORM), 64 LayerAnimationElement::TRANSFORM),
65 element->properties()) 65 element->properties())
66 << "Only transform animations are currently invertible."; 66 << "Only transform animations are currently invertible.";
67 67
68 scoped_ptr<LayerAnimationElement> to_return( 68 scoped_ptr<LayerAnimationElement> to_return(
69 LayerAnimationElement::CreateInverseTransformElement(base, element)); 69 LayerAnimationElement::CreateInverseTransformElement(base, element));
70 return to_return.Pass(); 70 return to_return;
71 } 71 }
72 72
73 Layer* base_layer_; 73 Layer* base_layer_;
74 // child layers 74 // child layers
75 std::vector<Layer*> inverse_layers_; 75 std::vector<Layer*> inverse_layers_;
76 }; 76 };
77 77
78 78
79 // ScopedLayerAnimationSettings ------------------------------------------------ 79 // ScopedLayerAnimationSettings ------------------------------------------------
80 ScopedLayerAnimationSettings::ScopedLayerAnimationSettings( 80 ScopedLayerAnimationSettings::ScopedLayerAnimationSettings(
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 } 153 }
154 inverse_observer_->SetLayer(base); 154 inverse_observer_->SetLayer(base);
155 } 155 }
156 156
157 void ScopedLayerAnimationSettings::AddInverselyAnimatedLayer( 157 void ScopedLayerAnimationSettings::AddInverselyAnimatedLayer(
158 Layer* inverse_layer) { 158 Layer* inverse_layer) {
159 inverse_observer_->AddInverselyAnimatedLayer(inverse_layer); 159 inverse_observer_->AddInverselyAnimatedLayer(inverse_layer);
160 } 160 }
161 161
162 } // namespace ui 162 } // namespace ui
OLDNEW
« no previous file with comments | « ui/compositor/layer_unittest.cc ('k') | ui/compositor/test/in_process_context_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698