aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkMatrix44.cpp
diff options
context:
space:
mode:
authorGravatar msarett <msarett@google.com>2016-06-23 12:42:29 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-06-23 12:42:29 -0700
commitc1a3e24918f99fc0b975111afb39dca38c50eb5c (patch)
tree8bfaaff83d9fac23c532f2a1dcff1ed804b8453d /src/core/SkMatrix44.cpp
parentac5fcea9c3ec32a87bfd8cb96531e82097a1d861 (diff)
SkMatrix44 clarifications and clean-ups
Fixed row/col major bug and added comments to the header. Made SkMatrix::I() thread safe using constexpr. Added a test set3x3RowMajorf(). BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2098583002 Review-Url: https://codereview.chromium.org/2098583002
Diffstat (limited to 'src/core/SkMatrix44.cpp')
-rw-r--r--src/core/SkMatrix44.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/SkMatrix44.cpp b/src/core/SkMatrix44.cpp
index 56c2e8a142..83c1adc673 100644
--- a/src/core/SkMatrix44.cpp
+++ b/src/core/SkMatrix44.cpp
@@ -186,7 +186,7 @@ void SkMatrix44::setRowMajord(const double src[]) {
///////////////////////////////////////////////////////////////////////////////
const SkMatrix44& SkMatrix44::I() {
- static const SkMatrix44 gIdentity44(kIdentity_Constructor);
+ static constexpr SkMatrix44 gIdentity44(kIdentity_Constructor);
return gIdentity44;
}
@@ -220,7 +220,7 @@ void SkMatrix44::set3x3(SkMScalar m00, SkMScalar m01, SkMScalar m02,
this->dirtyTypeMask();
}
-void SkMatrix44::set3x3ColMajorf(const float src[]) {
+void SkMatrix44::set3x3RowMajorf(const float src[]) {
fMat[0][0] = src[0]; fMat[0][1] = src[3]; fMat[0][2] = src[6]; fMat[0][3] = 0;
fMat[1][0] = src[1]; fMat[1][1] = src[4]; fMat[1][2] = src[7]; fMat[1][3] = 0;
fMat[2][0] = src[2]; fMat[2][1] = src[5]; fMat[2][2] = src[8]; fMat[2][3] = 0;