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