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/layer.h" | 5 #include "ui/compositor/layer.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 LayerAnimationElement::TRANSFORM)) { | 241 LayerAnimationElement::TRANSFORM)) { |
242 return animator_->GetTargetTransform(); | 242 return animator_->GetTargetTransform(); |
243 } | 243 } |
244 return transform(); | 244 return transform(); |
245 } | 245 } |
246 | 246 |
247 void Layer::SetBounds(const gfx::Rect& bounds) { | 247 void Layer::SetBounds(const gfx::Rect& bounds) { |
248 GetAnimator()->SetBounds(bounds); | 248 GetAnimator()->SetBounds(bounds); |
249 } | 249 } |
250 | 250 |
251 void Layer::SetSubpixelPositionOffset(const gfx::Vector2dF offset) { | 251 void Layer::SetSubpixelPositionOffset(const gfx::Vector2dF& offset) { |
252 subpixel_position_offset_ = offset; | 252 subpixel_position_offset_ = offset; |
253 RecomputePosition(); | 253 RecomputePosition(); |
254 } | 254 } |
255 | 255 |
256 gfx::Rect Layer::GetTargetBounds() const { | 256 gfx::Rect Layer::GetTargetBounds() const { |
257 if (animator_.get() && animator_->IsAnimatingProperty( | 257 if (animator_.get() && animator_->IsAnimatingProperty( |
258 LayerAnimationElement::BOUNDS)) { | 258 LayerAnimationElement::BOUNDS)) { |
259 return animator_->GetTargetBounds(); | 259 return animator_->GetTargetBounds(); |
260 } | 260 } |
261 return bounds_; | 261 return bounds_; |
(...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1093 children_.end(), | 1093 children_.end(), |
1094 std::bind2nd(std::mem_fun(&Layer::RemoveAnimatorsInTreeFromCollection), | 1094 std::bind2nd(std::mem_fun(&Layer::RemoveAnimatorsInTreeFromCollection), |
1095 collection)); | 1095 collection)); |
1096 } | 1096 } |
1097 | 1097 |
1098 bool Layer::IsAnimating() const { | 1098 bool Layer::IsAnimating() const { |
1099 return animator_.get() && animator_->is_animating(); | 1099 return animator_.get() && animator_->is_animating(); |
1100 } | 1100 } |
1101 | 1101 |
1102 } // namespace ui | 1102 } // namespace ui |
OLD | NEW |