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