| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CC_ANIMATION_TRANSFORM_OPERATION_H_ | 5 #ifndef CC_ANIMATION_TRANSFORM_OPERATION_H_ |
| 6 #define CC_ANIMATION_TRANSFORM_OPERATION_H_ | 6 #define CC_ANIMATION_TRANSFORM_OPERATION_H_ |
| 7 | 7 |
| 8 #include "ui/gfx/transform.h" | 8 #include "ui/gfx/transform.h" |
| 9 | 9 |
| 10 namespace gfx { | 10 namespace gfx { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 }; | 25 }; |
| 26 | 26 |
| 27 TransformOperation() | 27 TransformOperation() |
| 28 : type(TransformOperationIdentity) { | 28 : type(TransformOperationIdentity) { |
| 29 } | 29 } |
| 30 | 30 |
| 31 Type type; | 31 Type type; |
| 32 gfx::Transform matrix; | 32 gfx::Transform matrix; |
| 33 | 33 |
| 34 union { | 34 union { |
| 35 double perspective_depth; | 35 SkMScalar perspective_depth; |
| 36 | 36 |
| 37 struct { | 37 struct { |
| 38 double x, y; | 38 SkMScalar x, y; |
| 39 } skew; | 39 } skew; |
| 40 | 40 |
| 41 struct { | 41 struct { |
| 42 double x, y, z; | 42 SkMScalar x, y, z; |
| 43 } scale; | 43 } scale; |
| 44 | 44 |
| 45 struct { | 45 struct { |
| 46 double x, y, z; | 46 SkMScalar x, y, z; |
| 47 } translate; | 47 } translate; |
| 48 | 48 |
| 49 struct { | 49 struct { |
| 50 struct { | 50 struct { |
| 51 double x, y, z; | 51 SkMScalar x, y, z; |
| 52 } axis; | 52 } axis; |
| 53 | 53 |
| 54 double angle; | 54 SkMScalar angle; |
| 55 } rotate; | 55 } rotate; |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 bool IsIdentity() const; | 58 bool IsIdentity() const; |
| 59 static bool BlendTransformOperations(const TransformOperation* from, | 59 static bool BlendTransformOperations(const TransformOperation* from, |
| 60 const TransformOperation* to, | 60 const TransformOperation* to, |
| 61 double progress, | 61 SkMScalar progress, |
| 62 gfx::Transform* result); | 62 gfx::Transform* result); |
| 63 | 63 |
| 64 static bool BlendedBoundsForBox(const gfx::BoxF& box, | 64 static bool BlendedBoundsForBox(const gfx::BoxF& box, |
| 65 const TransformOperation* from, | 65 const TransformOperation* from, |
| 66 const TransformOperation* to, | 66 const TransformOperation* to, |
| 67 double min_progress, | 67 SkMScalar min_progress, |
| 68 double max_progress, | 68 SkMScalar max_progress, |
| 69 gfx::BoxF* bounds); | 69 gfx::BoxF* bounds); |
| 70 }; | 70 }; |
| 71 | 71 |
| 72 } // namespace cc | 72 } // namespace cc |
| 73 | 73 |
| 74 #endif // CC_ANIMATION_TRANSFORM_OPERATION_H_ | 74 #endif // CC_ANIMATION_TRANSFORM_OPERATION_H_ |
| OLD | NEW |