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
3 // found in the LICENSE file.
5 #ifndef CC_ANIMATION_TRANSFORM_OPERATION_H_
6 #define CC_ANIMATION_TRANSFORM_OPERATION_H_
8 #include "ui/gfx/transform.h"
16 struct TransformOperation
{
18 TRANSFORM_OPERATION_TRANSLATE
,
19 TRANSFORM_OPERATION_ROTATE
,
20 TRANSFORM_OPERATION_SCALE
,
21 TRANSFORM_OPERATION_SKEW
,
22 TRANSFORM_OPERATION_PERSPECTIVE
,
23 TRANSFORM_OPERATION_MATRIX
,
24 TRANSFORM_OPERATION_IDENTITY
27 TransformOperation() : type(TRANSFORM_OPERATION_IDENTITY
) {}
30 gfx::Transform matrix
;
33 SkMScalar perspective_depth
;
56 bool IsIdentity() const;
57 static bool BlendTransformOperations(const TransformOperation
* from
,
58 const TransformOperation
* to
,
60 gfx::Transform
* result
);
62 static bool BlendedBoundsForBox(const gfx::BoxF
& box
,
63 const TransformOperation
* from
,
64 const TransformOperation
* to
,
65 SkMScalar min_progress
,
66 SkMScalar max_progress
,
72 #endif // CC_ANIMATION_TRANSFORM_OPERATION_H_