OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef UI_GFX_COMPOSITOR_LAYER_ANIMATOR_H_ | 5 #ifndef UI_GFX_COMPOSITOR_LAYER_ANIMATOR_H_ |
6 #define UI_GFX_COMPOSITOR_LAYER_ANIMATOR_H_ | 6 #define UI_GFX_COMPOSITOR_LAYER_ANIMATOR_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
13 #include "third_party/skia/include/core/SkScalar.h" | 13 #include "third_party/skia/include/core/SkScalar.h" |
| 14 #include "third_party/skia/include/utils/SkMatrix44.h" |
14 #include "ui/base/animation/animation_delegate.h" | 15 #include "ui/base/animation/animation_delegate.h" |
15 #include "ui/base/animation/tween.h" | 16 #include "ui/base/animation/tween.h" |
16 #include "ui/gfx/point.h" | 17 #include "ui/gfx/point.h" |
17 | 18 |
18 namespace ui { | 19 namespace ui { |
19 | 20 |
20 class Layer; | 21 class Layer; |
21 class MultiAnimation; | 22 class MultiAnimation; |
22 class Transform; | 23 class Transform; |
23 | 24 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 struct LocationParams { | 62 struct LocationParams { |
62 int start_x; | 63 int start_x; |
63 int start_y; | 64 int start_y; |
64 int target_x; | 65 int target_x; |
65 int target_y; | 66 int target_y; |
66 }; | 67 }; |
67 | 68 |
68 // Parameters used whe animating the transform. | 69 // Parameters used whe animating the transform. |
69 struct TransformParams { | 70 struct TransformParams { |
70 // TODO: make 4x4 whe Transform is updated. | 71 // TODO: make 4x4 whe Transform is updated. |
71 SkScalar start[9]; | 72 SkMScalar start[16]; |
72 SkScalar target[9]; | 73 SkMScalar target[16]; |
73 }; | 74 }; |
74 | 75 |
75 union Params { | 76 union Params { |
76 LocationParams location; | 77 LocationParams location; |
77 TransformParams transform; | 78 TransformParams transform; |
78 }; | 79 }; |
79 | 80 |
80 // Used for tracking the animation of a particular property. | 81 // Used for tracking the animation of a particular property. |
81 struct Element { | 82 struct Element { |
82 Params params; | 83 Params params; |
(...skipping 23 matching lines...) Expand all Loading... |
106 | 107 |
107 // Type of animation for newly created animations. | 108 // Type of animation for newly created animations. |
108 ui::Tween::Type animation_type_; | 109 ui::Tween::Type animation_type_; |
109 | 110 |
110 DISALLOW_COPY_AND_ASSIGN(LayerAnimator); | 111 DISALLOW_COPY_AND_ASSIGN(LayerAnimator); |
111 }; | 112 }; |
112 | 113 |
113 } // namespace ui | 114 } // namespace ui |
114 | 115 |
115 #endif // UI_GFX_COMPOSITOR_LAYER_ANIMATOR_H_ | 116 #endif // UI_GFX_COMPOSITOR_LAYER_ANIMATOR_H_ |
OLD | NEW |