| 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 { |
| 11 class BoxF; | 11 class BoxF; |
| 12 } | 12 } |
| 13 | 13 |
| 14 namespace cc { | 14 namespace cc { |
| 15 | 15 |
| 16 struct TransformOperation { | 16 struct TransformOperation { |
| 17 enum Type { | 17 enum Type { |
| 18 TRANSFORM_OPERATION_TRANSLATE, | 18 TransformOperationTranslate, |
| 19 TRANSFORM_OPERATION_ROTATE, | 19 TransformOperationRotate, |
| 20 TRANSFORM_OPERATION_SCALE, | 20 TransformOperationScale, |
| 21 TRANSFORM_OPERATION_SKEW, | 21 TransformOperationSkew, |
| 22 TRANSFORM_OPERATION_PERSPECTIVE, | 22 TransformOperationPerspective, |
| 23 TRANSFORM_OPERATION_MATRIX, | 23 TransformOperationMatrix, |
| 24 TRANSFORM_OPERATION_IDENTITY | 24 TransformOperationIdentity |
| 25 }; | 25 }; |
| 26 | 26 |
| 27 TransformOperation() : type(TRANSFORM_OPERATION_IDENTITY) {} | 27 TransformOperation() |
| 28 : type(TransformOperationIdentity) { |
| 29 } |
| 28 | 30 |
| 29 Type type; | 31 Type type; |
| 30 gfx::Transform matrix; | 32 gfx::Transform matrix; |
| 31 | 33 |
| 32 union { | 34 union { |
| 33 SkMScalar perspective_depth; | 35 SkMScalar perspective_depth; |
| 34 | 36 |
| 35 struct { | 37 struct { |
| 36 SkMScalar x, y; | 38 SkMScalar x, y; |
| 37 } skew; | 39 } skew; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 63 const TransformOperation* from, | 65 const TransformOperation* from, |
| 64 const TransformOperation* to, | 66 const TransformOperation* to, |
| 65 SkMScalar min_progress, | 67 SkMScalar min_progress, |
| 66 SkMScalar max_progress, | 68 SkMScalar max_progress, |
| 67 gfx::BoxF* bounds); | 69 gfx::BoxF* bounds); |
| 68 }; | 70 }; |
| 69 | 71 |
| 70 } // namespace cc | 72 } // namespace cc |
| 71 | 73 |
| 72 #endif // CC_ANIMATION_TRANSFORM_OPERATION_H_ | 74 #endif // CC_ANIMATION_TRANSFORM_OPERATION_H_ |
| OLD | NEW |