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

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

Issue 23043011: cc: Use SkMScalar instead of doubles everywhere in cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: danakj review Created 7 years, 3 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_ANIMATION_TRANSFORM_OPERATION_H_ 5 #ifndef CC_ANIMATION_TRANSFORM_OPERATION_H_
6 #define CC_ANIMATION_TRANSFORM_OPERATION_H_ 6 #define CC_ANIMATION_TRANSFORM_OPERATION_H_
7 7
8 #include "ui/gfx/transform.h" 8 #include "ui/gfx/transform.h"
9 9
10 namespace gfx { 10 namespace gfx {
(...skipping 14 matching lines...) Expand all
25 }; 25 };
26 26
27 TransformOperation() 27 TransformOperation()
28 : type(TransformOperationIdentity) { 28 : type(TransformOperationIdentity) {
29 } 29 }
30 30
31 Type type; 31 Type type;
32 gfx::Transform matrix; 32 gfx::Transform matrix;
33 33
34 union { 34 union {
35 double perspective_depth; 35 SkMScalar perspective_depth;
36 36
37 struct { 37 struct {
38 double x, y; 38 SkMScalar x, y;
39 } skew; 39 } skew;
40 40
41 struct { 41 struct {
42 double x, y, z; 42 SkMScalar x, y, z;
43 } scale; 43 } scale;
44 44
45 struct { 45 struct {
46 double x, y, z; 46 SkMScalar x, y, z;
47 } translate; 47 } translate;
48 48
49 struct { 49 struct {
50 struct { 50 struct {
51 double x, y, z; 51 SkMScalar x, y, z;
52 } axis; 52 } axis;
53 53
54 double angle; 54 SkMScalar angle;
55 } rotate; 55 } rotate;
56 }; 56 };
57 57
58 bool IsIdentity() const; 58 bool IsIdentity() const;
59 static bool BlendTransformOperations(const TransformOperation* from, 59 static bool BlendTransformOperations(const TransformOperation* from,
60 const TransformOperation* to, 60 const TransformOperation* to,
61 double progress, 61 SkMScalar progress,
62 gfx::Transform* result); 62 gfx::Transform* result);
63 63
64 static bool BlendedBoundsForBox(const gfx::BoxF& box, 64 static bool BlendedBoundsForBox(const gfx::BoxF& box,
65 const TransformOperation* from, 65 const TransformOperation* from,
66 const TransformOperation* to, 66 const TransformOperation* to,
67 double min_progress, 67 SkMScalar min_progress,
68 double max_progress, 68 SkMScalar max_progress,
69 gfx::BoxF* bounds); 69 gfx::BoxF* bounds);
70 }; 70 };
71 71
72 } // namespace cc 72 } // namespace cc
73 73
74 #endif // CC_ANIMATION_TRANSFORM_OPERATION_H_ 74 #endif // CC_ANIMATION_TRANSFORM_OPERATION_H_
OLDNEW
« no previous file with comments | « cc/animation/layer_animation_controller_unittest.cc ('k') | cc/animation/transform_operation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698