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

Unified Diff: third_party/WebKit/Source/platform/animation/CompositorTransformOperations.h

Issue 1616653002: CC Animation: Move files from cc_blink to Source/platform/animation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Fix copyrights and years. Created 4 years, 10 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
Index: third_party/WebKit/Source/platform/animation/CompositorTransformOperations.h
diff --git a/third_party/WebKit/Source/platform/animation/CompositorTransformOperations.h b/third_party/WebKit/Source/platform/animation/CompositorTransformOperations.h
new file mode 100644
index 0000000000000000000000000000000000000000..63be7152ff60b34d319890d2d5e408ec38863b51
--- /dev/null
+++ b/third_party/WebKit/Source/platform/animation/CompositorTransformOperations.h
@@ -0,0 +1,45 @@
+// Copyright 2016 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 CompositorTransformOperations_h
+#define CompositorTransformOperations_h
+
+#include "cc/animation/transform_operations.h"
+#include "platform/PlatformExport.h"
+#include "wtf/Noncopyable.h"
+
+class SkMatrix44;
+
+namespace blink {
+
+class PLATFORM_EXPORT CompositorTransformOperations {
+ WTF_MAKE_NONCOPYABLE(CompositorTransformOperations);
+public:
+ CompositorTransformOperations();
+ virtual ~CompositorTransformOperations();
+
+ const cc::TransformOperations& asTransformOperations() const;
+
+ // Returns true if these operations can be blended. It will only return
+ // false if we must resort to matrix interpolation, and matrix interpolation
+ // fails (this can happen if either matrix cannot be decomposed).
+ virtual bool canBlendWith(const CompositorTransformOperations& other) const;
+
+ virtual void appendTranslate(double x, double y, double z);
+ virtual void appendRotate(double x, double y, double z, double degrees);
+ virtual void appendScale(double x, double y, double z);
+ virtual void appendSkew(double x, double y);
+ virtual void appendPerspective(double depth);
+ virtual void appendMatrix(const SkMatrix44&);
+ virtual void appendIdentity();
+
+ virtual bool isIdentity() const;
+
+private:
+ cc::TransformOperations m_transformOperations;
+};
+
+} // namespace blink
+
+#endif // CompositorTransformOperations_h

Powered by Google App Engine
This is Rietveld 408576698