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

Side by Side Diff: cc/transform_operation.h

Issue 11876016: Define cc::TransformOperations and webkit::WebTransformOperationsImpl (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Put TransformOperation into its own header Created 7 years, 11 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/test/animation_test_common.cc ('k') | cc/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_TRANSFORM_OPERATION_H_
6 #define CC_TRANSFORM_OPERATION_H
7
8 #include "third_party/WebKit/Source/Platform/chromium/public/WebTransformationMa trix.h"
9
10 namespace cc {
11
12 struct TransformOperation {
13 enum Type {
14 TransformOperationTranslate,
15 TransformOperationRotate,
16 TransformOperationScale,
17 TransformOperationSkew,
18 TransformOperationPerspective,
19 TransformOperationMatrix,
20 TransformOperationIdentity
21 };
22
23 TransformOperation()
24 : type(TransformOperationIdentity) {
25 }
26
27 Type type;
28 WebKit::WebTransformationMatrix matrix;
29
30 union {
31 double perspective_depth;
32
33 struct {
34 double x, y;
35 } skew;
36
37 struct {
38 double x, y, z;
39 } scale;
40
41 struct {
42 double x, y, z;
43 } translate;
44
45 struct {
46 struct {
47 double x, y, z;
48 } axis;
49
50 double angle;
51 } rotate;
52 };
53
54 bool IsIdentity() const;
55 static bool BlendTransformOperations(const TransformOperation* from,
56 const TransformOperation* to,
57 double progress,
58 WebKit::WebTransformationMatrix& result);
59 };
60
61 } // namespace cc
62
63 #endif // CC_TRANSFORM_OPERATION_H_
OLDNEW
« no previous file with comments | « cc/test/animation_test_common.cc ('k') | cc/transform_operation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698