Remove GCMDriver::IsGCMClientReady
[chromium-blink-merge.git] / cc / animation / transform_operation.h
blob345ff295e390b4aa81bbf2c55ad92373904d2497
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 gfx {
11 class BoxF;
14 namespace cc {
16 struct TransformOperation {
17 enum Type {
18 TransformOperationTranslate,
19 TransformOperationRotate,
20 TransformOperationScale,
21 TransformOperationSkew,
22 TransformOperationPerspective,
23 TransformOperationMatrix,
24 TransformOperationIdentity
27 TransformOperation()
28 : type(TransformOperationIdentity) {
31 Type type;
32 gfx::Transform matrix;
34 union {
35 SkMScalar perspective_depth;
37 struct {
38 SkMScalar x, y;
39 } skew;
41 struct {
42 SkMScalar x, y, z;
43 } scale;
45 struct {
46 SkMScalar x, y, z;
47 } translate;
49 struct {
50 struct {
51 SkMScalar x, y, z;
52 } axis;
54 SkMScalar angle;
55 } rotate;
58 bool IsIdentity() const;
59 static bool BlendTransformOperations(const TransformOperation* from,
60 const TransformOperation* to,
61 SkMScalar progress,
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,
69 gfx::BoxF* bounds);
72 } // namespace cc
74 #endif // CC_ANIMATION_TRANSFORM_OPERATION_H_