diff options
author | Brian Osman <brianosman@google.com> | 2018-04-20 12:04:06 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-04-20 18:08:18 +0000 |
commit | 2fda63abcdd4ba7ee41e5226b68c93b102b76fb2 (patch) | |
tree | 37e7c4195cc51afc4ba1a6cf1c87303a32f53af3 /src/core/SkMatrix44.cpp | |
parent | 1df7cd871224adeca1d0491c061a16fe4e6d28bc (diff) |
Fix argument names and documentation for SkMatrix44::set3x3()
Column-major is an implementation choice, not an interface. There is
exactly one acceptable subscript notation for indexing matrix elements,
and it's row first, then column. Having these named backwards was
unnecessarily confusing.
Note that this doesn't alter behavior in any way, it just brings this
function in line with expectations from any reasonable mathematician.
Change-Id: Ie4ceb40281ef507889d25403afbf24116514c45a
Reviewed-on: https://skia-review.googlesource.com/122790
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src/core/SkMatrix44.cpp')
-rw-r--r-- | src/core/SkMatrix44.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/core/SkMatrix44.cpp b/src/core/SkMatrix44.cpp index f5cdc2344a..c8bd191bbe 100644 --- a/src/core/SkMatrix44.cpp +++ b/src/core/SkMatrix44.cpp @@ -205,13 +205,13 @@ void SkMatrix44::setIdentity() { this->setTypeMask(kIdentity_Mask); } -void SkMatrix44::set3x3(SkMScalar m00, SkMScalar m01, SkMScalar m02, - SkMScalar m10, SkMScalar m11, SkMScalar m12, - SkMScalar m20, SkMScalar m21, SkMScalar m22) { - fMat[0][0] = m00; fMat[0][1] = m01; fMat[0][2] = m02; fMat[0][3] = 0; - fMat[1][0] = m10; fMat[1][1] = m11; fMat[1][2] = m12; fMat[1][3] = 0; - fMat[2][0] = m20; fMat[2][1] = m21; fMat[2][2] = m22; fMat[2][3] = 0; - fMat[3][0] = 0; fMat[3][1] = 0; fMat[3][2] = 0; fMat[3][3] = 1; +void SkMatrix44::set3x3(SkMScalar m_00, SkMScalar m_10, SkMScalar m_20, + SkMScalar m_01, SkMScalar m_11, SkMScalar m_21, + SkMScalar m_02, SkMScalar m_12, SkMScalar m_22) { + fMat[0][0] = m_00; fMat[0][1] = m_10; fMat[0][2] = m_20; fMat[0][3] = 0; + fMat[1][0] = m_01; fMat[1][1] = m_11; fMat[1][2] = m_21; fMat[1][3] = 0; + fMat[2][0] = m_02; fMat[2][1] = m_12; fMat[2][2] = m_22; fMat[2][3] = 0; + fMat[3][0] = 0; fMat[3][1] = 0; fMat[3][2] = 0; fMat[3][3] = 1; this->dirtyTypeMask(); } |