Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(155)

Side by Side Diff: cc/animation/transform_operation.h

Issue 1057283003: Remove parts of //cc we aren't using (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/animation/timing_function.cc ('k') | cc/animation/transform_operation.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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.
4
5 #ifndef CC_ANIMATION_TRANSFORM_OPERATION_H_
6 #define CC_ANIMATION_TRANSFORM_OPERATION_H_
7
8 #include "ui/gfx/transform.h"
9
10 namespace gfx {
11 class BoxF;
12 }
13
14 namespace cc {
15
16 struct TransformOperation {
17 enum Type {
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
25 };
26
27 TransformOperation() : type(TRANSFORM_OPERATION_IDENTITY) {}
28
29 Type type;
30 gfx::Transform matrix;
31
32 union {
33 SkMScalar perspective_depth;
34
35 struct {
36 SkMScalar x, y;
37 } skew;
38
39 struct {
40 SkMScalar x, y, z;
41 } scale;
42
43 struct {
44 SkMScalar x, y, z;
45 } translate;
46
47 struct {
48 struct {
49 SkMScalar x, y, z;
50 } axis;
51
52 SkMScalar angle;
53 } rotate;
54 };
55
56 bool IsIdentity() const;
57 static bool BlendTransformOperations(const TransformOperation* from,
58 const TransformOperation* to,
59 SkMScalar progress,
60 gfx::Transform* result);
61
62 static bool BlendedBoundsForBox(const gfx::BoxF& box,
63 const TransformOperation* from,
64 const TransformOperation* to,
65 SkMScalar min_progress,
66 SkMScalar max_progress,
67 gfx::BoxF* bounds);
68 };
69
70 } // namespace cc
71
72 #endif // CC_ANIMATION_TRANSFORM_OPERATION_H_
OLDNEW
« no previous file with comments | « cc/animation/timing_function.cc ('k') | cc/animation/transform_operation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698