| 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/test/test_layer_animation_delegate.h" | 5 #include "ui/compositor/test/test_layer_animation_delegate.h" |
| 6 | 6 |
| 7 namespace ui { | 7 namespace ui { |
| 8 | 8 |
| 9 TestLayerAnimationDelegate::TestLayerAnimationDelegate() | 9 TestLayerAnimationDelegate::TestLayerAnimationDelegate() |
| 10 : opacity_(1.0f), | 10 : opacity_(1.0f), |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 TestLayerAnimationDelegate::~TestLayerAnimationDelegate() { | 26 TestLayerAnimationDelegate::~TestLayerAnimationDelegate() { |
| 27 } | 27 } |
| 28 | 28 |
| 29 void TestLayerAnimationDelegate::SetBoundsFromAnimation( | 29 void TestLayerAnimationDelegate::SetBoundsFromAnimation( |
| 30 const gfx::Rect& bounds) { | 30 const gfx::Rect& bounds) { |
| 31 bounds_ = bounds; | 31 bounds_ = bounds; |
| 32 } | 32 } |
| 33 | 33 |
| 34 void TestLayerAnimationDelegate::SetTransformFromAnimation( | 34 void TestLayerAnimationDelegate::SetTransformFromAnimation( |
| 35 const Transform& transform) { | 35 const gfx::Transform& transform) { |
| 36 transform_ = transform; | 36 transform_ = transform; |
| 37 } | 37 } |
| 38 | 38 |
| 39 void TestLayerAnimationDelegate::SetOpacityFromAnimation(float opacity) { | 39 void TestLayerAnimationDelegate::SetOpacityFromAnimation(float opacity) { |
| 40 opacity_ = opacity; | 40 opacity_ = opacity; |
| 41 } | 41 } |
| 42 | 42 |
| 43 void TestLayerAnimationDelegate::SetVisibilityFromAnimation(bool visibility) { | 43 void TestLayerAnimationDelegate::SetVisibilityFromAnimation(bool visibility) { |
| 44 visibility_ = visibility; | 44 visibility_ = visibility; |
| 45 } | 45 } |
| (...skipping 10 matching lines...) Expand all Loading... |
| 56 color_ = color; | 56 color_ = color; |
| 57 } | 57 } |
| 58 | 58 |
| 59 void TestLayerAnimationDelegate::ScheduleDrawForAnimation() { | 59 void TestLayerAnimationDelegate::ScheduleDrawForAnimation() { |
| 60 } | 60 } |
| 61 | 61 |
| 62 const gfx::Rect& TestLayerAnimationDelegate::GetBoundsForAnimation() const { | 62 const gfx::Rect& TestLayerAnimationDelegate::GetBoundsForAnimation() const { |
| 63 return bounds_; | 63 return bounds_; |
| 64 } | 64 } |
| 65 | 65 |
| 66 const Transform& TestLayerAnimationDelegate::GetTransformForAnimation() const { | 66 const gfx::Transform& |
| 67 TestLayerAnimationDelegate::GetTransformForAnimation() const { |
| 67 return transform_; | 68 return transform_; |
| 68 } | 69 } |
| 69 | 70 |
| 70 float TestLayerAnimationDelegate::GetOpacityForAnimation() const { | 71 float TestLayerAnimationDelegate::GetOpacityForAnimation() const { |
| 71 return opacity_; | 72 return opacity_; |
| 72 } | 73 } |
| 73 | 74 |
| 74 bool TestLayerAnimationDelegate::GetVisibilityForAnimation() const { | 75 bool TestLayerAnimationDelegate::GetVisibilityForAnimation() const { |
| 75 return visibility_; | 76 return visibility_; |
| 76 } | 77 } |
| 77 | 78 |
| 78 float TestLayerAnimationDelegate::GetBrightnessForAnimation() const { | 79 float TestLayerAnimationDelegate::GetBrightnessForAnimation() const { |
| 79 return brightness_; | 80 return brightness_; |
| 80 } | 81 } |
| 81 | 82 |
| 82 float TestLayerAnimationDelegate::GetGrayscaleForAnimation() const { | 83 float TestLayerAnimationDelegate::GetGrayscaleForAnimation() const { |
| 83 return grayscale_; | 84 return grayscale_; |
| 84 } | 85 } |
| 85 | 86 |
| 86 SkColor TestLayerAnimationDelegate::GetColorForAnimation() const { | 87 SkColor TestLayerAnimationDelegate::GetColorForAnimation() const { |
| 87 return color_; | 88 return color_; |
| 88 } | 89 } |
| 89 | 90 |
| 90 } // namespace ui | 91 } // namespace ui |
| OLD | NEW |