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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/test/animation_test_common.cc ('k') | cc/transform_operation.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/transform_operation.h
diff --git a/cc/transform_operation.h b/cc/transform_operation.h
new file mode 100644
index 0000000000000000000000000000000000000000..3a74095588b6acbeba018b7d486af21e1451525d
--- /dev/null
+++ b/cc/transform_operation.h
@@ -0,0 +1,63 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CC_TRANSFORM_OPERATION_H_
+#define CC_TRANSFORM_OPERATION_H
+
+#include "third_party/WebKit/Source/Platform/chromium/public/WebTransformationMatrix.h"
+
+namespace cc {
+
+struct TransformOperation {
+ enum Type {
+ TransformOperationTranslate,
+ TransformOperationRotate,
+ TransformOperationScale,
+ TransformOperationSkew,
+ TransformOperationPerspective,
+ TransformOperationMatrix,
+ TransformOperationIdentity
+ };
+
+ TransformOperation()
+ : type(TransformOperationIdentity) {
+ }
+
+ Type type;
+ WebKit::WebTransformationMatrix matrix;
+
+ union {
+ double perspective_depth;
+
+ struct {
+ double x, y;
+ } skew;
+
+ struct {
+ double x, y, z;
+ } scale;
+
+ struct {
+ double x, y, z;
+ } translate;
+
+ struct {
+ struct {
+ double x, y, z;
+ } axis;
+
+ double angle;
+ } rotate;
+ };
+
+ bool IsIdentity() const;
+ static bool BlendTransformOperations(const TransformOperation* from,
+ const TransformOperation* to,
+ double progress,
+ WebKit::WebTransformationMatrix& result);
+};
+
+} // namespace cc
+
+#endif // CC_TRANSFORM_OPERATION_H_
« 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