aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkMatrix44.h
diff options
context:
space:
mode:
authorGravatar msarett <msarett@google.com>2016-06-22 08:18:54 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-06-22 08:18:54 -0700
commit111a42d9cebf0bb8844c5d24f67fac57cc619d29 (patch)
treece93848c7176621f02b2ced77d56572932ebd4e4 /include/core/SkMatrix44.h
parent05dceabf3422b785b52439378aa5527c42c6ca18 (diff)
Enable flattening and unflattening of SkColorSpace
Diffstat (limited to 'include/core/SkMatrix44.h')
-rw-r--r--include/core/SkMatrix44.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/core/SkMatrix44.h b/include/core/SkMatrix44.h
index d64d4b7074..715ee782c8 100644
--- a/include/core/SkMatrix44.h
+++ b/include/core/SkMatrix44.h
@@ -439,6 +439,15 @@ private:
kAllPublic_Masks = 0xF
};
+ /** 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;
+
+ /* This sets the top-left of the matrix and clears the
+ * perspective components (with [3][3] set to 1). */
+ void set4x3ColMajorf(const float[]);
+
SkMScalar transX() const { return fMat[3][0]; }
SkMScalar transY() const { return fMat[3][1]; }
SkMScalar transZ() const { return fMat[3][2]; }
@@ -469,6 +478,8 @@ private:
inline bool isTriviallyIdentity() const {
return 0 == fTypeMask;
}
+
+ friend class SkColorSpace;
};
#endif