diff options
author | 2016-06-22 08:18:54 -0700 | |
---|---|---|
committer | 2016-06-22 08:18:54 -0700 | |
commit | 111a42d9cebf0bb8844c5d24f67fac57cc619d29 (patch) | |
tree | ce93848c7176621f02b2ced77d56572932ebd4e4 /include/core/SkMatrix44.h | |
parent | 05dceabf3422b785b52439378aa5527c42c6ca18 (diff) |
Enable flattening and unflattening of SkColorSpace
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2085653003
Review-Url: https://codereview.chromium.org/2085653003
Diffstat (limited to 'include/core/SkMatrix44.h')
-rw-r--r-- | include/core/SkMatrix44.h | 11 |
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 |