summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/platform/transforms/transformation_matrix.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/blink/renderer/platform/transforms/transformation_matrix.h')
-rw-r--r--chromium/third_party/blink/renderer/platform/transforms/transformation_matrix.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/chromium/third_party/blink/renderer/platform/transforms/transformation_matrix.h b/chromium/third_party/blink/renderer/platform/transforms/transformation_matrix.h
index 816565aec6f..7f524dca1b8 100644
--- a/chromium/third_party/blink/renderer/platform/transforms/transformation_matrix.h
+++ b/chromium/third_party/blink/renderer/platform/transforms/transformation_matrix.h
@@ -393,10 +393,20 @@ class PLATFORM_EXPORT TransformationMatrix {
double perspective_x, perspective_y, perspective_z, perspective_w;
} DecomposedType;
+ // Decompose 2-D transform matrix into its component parts.
+ typedef struct {
+ double scale_x, scale_y;
+ double skew_xy;
+ double translate_x, translate_y;
+ double angle;
+ } Decomposed2dType;
+
WARN_UNUSED_RESULT bool Decompose(DecomposedType&) const;
+ WARN_UNUSED_RESULT bool Decompose2D(Decomposed2dType&) const;
void Recompose(const DecomposedType&);
-
+ void Recompose2D(const Decomposed2dType&);
void Blend(const TransformationMatrix& from, double progress);
+ void Blend2D(const TransformationMatrix& from, double progress);
bool IsAffine() const {
return M13() == 0 && M14() == 0 && M23() == 0 && M24() == 0 && M31() == 0 &&
@@ -475,6 +485,8 @@ class PLATFORM_EXPORT TransformationMatrix {
matrix_[2][3] == 0 && matrix_[3][2] == 0 && matrix_[3][3] == 1;
}
+ bool Is2dTransform() const;
+
bool IsIntegerTranslation() const;
// Returns true if axis-aligned 2d rects will remain axis-aligned after being