Index: include/core/SkMatrix44.h |
diff --git a/include/core/SkMatrix44.h b/include/core/SkMatrix44.h |
index d64d4b7074055e489ed673ffa75c31bc9d869bf7..bcf7a03760526b1ef9f648b5810e7985746cda95 100644 |
--- a/include/core/SkMatrix44.h |
+++ b/include/core/SkMatrix44.h |
@@ -287,6 +287,11 @@ public: |
void asRowMajorf(float[]) const; |
void asRowMajord(double[]) const; |
+ /** Efficiently reads 12 matrix entries, ignoring the last col. |
+ * This is typically useful when we know the last col is (0, 0, 0, 1). |
+ */ |
+ void as4x3ColMajorf(float[]) const; |
+ |
/** These methods allow one to efficiently set all matrix entries from an |
* array. The given array must have room for exactly 16 entries. Whenever |
* possible, they will try to use memcpy rather than an entry-by-entry |
@@ -312,6 +317,10 @@ public: |
SkMScalar m20, SkMScalar m21, SkMScalar m22); |
void set3x3ColMajorf(const float[]); |
+ /* This sets the top-left of the matrix and clears the |
+ * perspective components (with [3][3] set to 1). */ |
reed1
2016/06/21 20:45:01
Lets make these private helpers at first. Not sure
msarett
2016/06/21 21:47:45
sgtm, done.
|
+ void set4x3ColMajorf(const float[]); |
+ |
void setTranslate(SkMScalar dx, SkMScalar dy, SkMScalar dz); |
void preTranslate(SkMScalar dx, SkMScalar dy, SkMScalar dz); |
void postTranslate(SkMScalar dx, SkMScalar dy, SkMScalar dz); |