Revert 199284 "[Downloads] Clear current_path_ when deleting int..."
[chromium-blink-merge.git] / cc / animation / transform_operation.h
blob74673ab48cb27d9d79311cf9dba7927d3534da89
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"
10 namespace cc {
12 struct TransformOperation {
13 enum Type {
14 TransformOperationTranslate,
15 TransformOperationRotate,
16 TransformOperationScale,
17 TransformOperationSkew,
18 TransformOperationPerspective,
19 TransformOperationMatrix,
20 TransformOperationIdentity
23 TransformOperation()
24 : type(TransformOperationIdentity) {
27 Type type;
28 gfx::Transform matrix;
30 union {
31 double perspective_depth;
33 struct {
34 double x, y;
35 } skew;
37 struct {
38 double x, y, z;
39 } scale;
41 struct {
42 double x, y, z;
43 } translate;
45 struct {
46 struct {
47 double x, y, z;
48 } axis;
50 double angle;
51 } rotate;
54 bool IsIdentity() const;
55 static bool BlendTransformOperations(const TransformOperation* from,
56 const TransformOperation* to,
57 double progress,
58 gfx::Transform* result);
61 } // namespace cc
63 #endif // CC_ANIMATION_TRANSFORM_OPERATION_H_