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 TransformOperationTranslate
,
19 TransformOperationRotate
,
20 TransformOperationScale
,
21 TransformOperationSkew
,
22 TransformOperationPerspective
,
23 TransformOperationMatrix
,
24 TransformOperationIdentity
28 : type(TransformOperationIdentity
) {
32 gfx::Transform matrix
;
35 SkMScalar perspective_depth
;
58 bool IsIdentity() const;
59 static bool BlendTransformOperations(const TransformOperation
* from
,
60 const TransformOperation
* to
,
62 gfx::Transform
* result
);
64 static bool BlendedBoundsForBox(const gfx::BoxF
& box
,
65 const TransformOperation
* from
,
66 const TransformOperation
* to
,
67 SkMScalar min_progress
,
68 SkMScalar max_progress
,
74 #endif // CC_ANIMATION_TRANSFORM_OPERATION_H_