| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 CompositorTransformOperations_h | 5 #ifndef CompositorTransformOperations_h |
| 6 #define CompositorTransformOperations_h | 6 #define CompositorTransformOperations_h |
| 7 | 7 |
| 8 #include "cc/animation/transform_operations.h" | 8 #include "cc/animation/transform_operations.h" |
| 9 #include "platform/PlatformExport.h" | 9 #include "platform/PlatformExport.h" |
| 10 #include "wtf/Noncopyable.h" | 10 #include "wtf/Noncopyable.h" |
| 11 | 11 |
| 12 class SkMatrix44; | 12 class SkMatrix44; |
| 13 | 13 |
| 14 namespace blink { | 14 namespace blink { |
| 15 | 15 |
| 16 class PLATFORM_EXPORT CompositorTransformOperations { | 16 class PLATFORM_EXPORT CompositorTransformOperations { |
| 17 WTF_MAKE_NONCOPYABLE(CompositorTransformOperations); | 17 WTF_MAKE_NONCOPYABLE(CompositorTransformOperations); |
| 18 public: | 18 public: |
| 19 CompositorTransformOperations(); | 19 CompositorTransformOperations(); |
| 20 virtual ~CompositorTransformOperations(); | |
| 21 | 20 |
| 22 const cc::TransformOperations& asTransformOperations() const; | 21 const cc::TransformOperations& asTransformOperations() const; |
| 23 | 22 |
| 24 // Returns true if these operations can be blended. It will only return | 23 // Returns true if these operations can be blended. It will only return |
| 25 // false if we must resort to matrix interpolation, and matrix interpolation | 24 // false if we must resort to matrix interpolation, and matrix interpolation |
| 26 // fails (this can happen if either matrix cannot be decomposed). | 25 // fails (this can happen if either matrix cannot be decomposed). |
| 27 virtual bool canBlendWith(const CompositorTransformOperations& other) const; | 26 bool canBlendWith(const CompositorTransformOperations& other) const; |
| 28 | 27 |
| 29 virtual void appendTranslate(double x, double y, double z); | 28 void appendTranslate(double x, double y, double z); |
| 30 virtual void appendRotate(double x, double y, double z, double degrees); | 29 void appendRotate(double x, double y, double z, double degrees); |
| 31 virtual void appendScale(double x, double y, double z); | 30 void appendScale(double x, double y, double z); |
| 32 virtual void appendSkew(double x, double y); | 31 void appendSkew(double x, double y); |
| 33 virtual void appendPerspective(double depth); | 32 void appendPerspective(double depth); |
| 34 virtual void appendMatrix(const SkMatrix44&); | 33 void appendMatrix(const SkMatrix44&); |
| 35 virtual void appendIdentity(); | 34 void appendIdentity(); |
| 36 | 35 |
| 37 virtual bool isIdentity() const; | 36 bool isIdentity() const; |
| 38 | 37 |
| 39 private: | 38 private: |
| 40 cc::TransformOperations m_transformOperations; | 39 cc::TransformOperations m_transformOperations; |
| 41 }; | 40 }; |
| 42 | 41 |
| 43 } // namespace blink | 42 } // namespace blink |
| 44 | 43 |
| 45 #endif // CompositorTransformOperations_h | 44 #endif // CompositorTransformOperations_h |
| OLD | NEW |