| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 struct { | 47 struct { |
| 48 struct { | 48 struct { |
| 49 SkMScalar x, y, z; | 49 SkMScalar x, y, z; |
| 50 } axis; | 50 } axis; |
| 51 | 51 |
| 52 SkMScalar angle; | 52 SkMScalar angle; |
| 53 } rotate; | 53 } rotate; |
| 54 }; | 54 }; |
| 55 | 55 |
| 56 bool IsIdentity() const; | 56 bool IsIdentity() const; |
| 57 |
| 58 // Sets |matrix| based on type and the union values. |
| 59 void Bake(); |
| 60 |
| 57 static bool BlendTransformOperations(const TransformOperation* from, | 61 static bool BlendTransformOperations(const TransformOperation* from, |
| 58 const TransformOperation* to, | 62 const TransformOperation* to, |
| 59 SkMScalar progress, | 63 SkMScalar progress, |
| 60 gfx::Transform* result); | 64 TransformOperation* result); |
| 61 | 65 |
| 62 static bool BlendedBoundsForBox(const gfx::BoxF& box, | 66 static bool BlendedBoundsForBox(const gfx::BoxF& box, |
| 63 const TransformOperation* from, | 67 const TransformOperation* from, |
| 64 const TransformOperation* to, | 68 const TransformOperation* to, |
| 65 SkMScalar min_progress, | 69 SkMScalar min_progress, |
| 66 SkMScalar max_progress, | 70 SkMScalar max_progress, |
| 67 gfx::BoxF* bounds); | 71 gfx::BoxF* bounds); |
| 68 }; | 72 }; |
| 69 | 73 |
| 70 } // namespace cc | 74 } // namespace cc |
| 71 | 75 |
| 72 #endif // CC_ANIMATION_TRANSFORM_OPERATION_H_ | 76 #endif // CC_ANIMATION_TRANSFORM_OPERATION_H_ |
| OLD | NEW |