aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkMatrix.cpp
diff options
context:
space:
mode:
authorGravatar Cary Clark <caryclark@skia.org>2017-10-12 15:33:28 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-10-12 19:56:31 +0000
commit708ec81d7a9bba12cd7e574b5c5ae80b2ad77919 (patch)
treeab62212c793e00eaab3e17372c75e67005d67675 /src/core/SkMatrix.cpp
parent2e67dea9d361dc80ed27a10c57efdd66e227e3c7 (diff)
move SkMatrix anonymous affine enum to private
enum members aren't used by SkMatrix.h or by clients outside of Skia. R: reed@google.com, bungeman@google.com Bug: skia:6898 Change-Id: I6873b4106e5ffe354caf5ec18cc613910304fa13 Reviewed-on: https://skia-review.googlesource.com/59160 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Cary Clark <caryclark@skia.org>
Diffstat (limited to 'src/core/SkMatrix.cpp')
-rw-r--r--src/core/SkMatrix.cpp37
1 files changed, 19 insertions, 18 deletions
diff --git a/src/core/SkMatrix.cpp b/src/core/SkMatrix.cpp
index 0ed9565fb9..45f77344fb 100644
--- a/src/core/SkMatrix.cpp
+++ b/src/core/SkMatrix.cpp
@@ -7,6 +7,7 @@
#include "SkFloatBits.h"
#include "SkMatrix.h"
+#include "SkMatrixPriv.h"
#include "SkNx.h"
#include "SkPaint.h"
#include "SkRSXform.h"
@@ -75,12 +76,12 @@ void SkMatrix::set9(const SkScalar buffer[]) {
}
void SkMatrix::setAffine(const SkScalar buffer[]) {
- fMat[kMScaleX] = buffer[kAScaleX];
- fMat[kMSkewX] = buffer[kASkewX];
- fMat[kMTransX] = buffer[kATransX];
- fMat[kMSkewY] = buffer[kASkewY];
- fMat[kMScaleY] = buffer[kAScaleY];
- fMat[kMTransY] = buffer[kATransY];
+ fMat[kMScaleX] = buffer[SkMatrixPriv::kAScaleX];
+ fMat[kMSkewX] = buffer[SkMatrixPriv::kASkewX];
+ fMat[kMTransX] = buffer[SkMatrixPriv::kATransX];
+ fMat[kMSkewY] = buffer[SkMatrixPriv::kASkewY];
+ fMat[kMScaleY] = buffer[SkMatrixPriv::kAScaleY];
+ fMat[kMTransY] = buffer[SkMatrixPriv::kATransY];
fMat[kMPersp0] = 0;
fMat[kMPersp1] = 0;
fMat[kMPersp2] = 1;
@@ -778,12 +779,12 @@ static double sk_inv_determinant(const float mat[9], int isPerspective) {
}
void SkMatrix::SetAffineIdentity(SkScalar affine[6]) {
- affine[kAScaleX] = 1;
- affine[kASkewY] = 0;
- affine[kASkewX] = 0;
- affine[kAScaleY] = 1;
- affine[kATransX] = 0;
- affine[kATransY] = 0;
+ affine[SkMatrixPriv::kAScaleX] = 1;
+ affine[SkMatrixPriv::kASkewY] = 0;
+ affine[SkMatrixPriv::kASkewX] = 0;
+ affine[SkMatrixPriv::kAScaleY] = 1;
+ affine[SkMatrixPriv::kATransX] = 0;
+ affine[SkMatrixPriv::kATransY] = 0;
}
bool SkMatrix::asAffine(SkScalar affine[6]) const {
@@ -791,12 +792,12 @@ bool SkMatrix::asAffine(SkScalar affine[6]) const {
return false;
}
if (affine) {
- affine[kAScaleX] = this->fMat[kMScaleX];
- affine[kASkewY] = this->fMat[kMSkewY];
- affine[kASkewX] = this->fMat[kMSkewX];
- affine[kAScaleY] = this->fMat[kMScaleY];
- affine[kATransX] = this->fMat[kMTransX];
- affine[kATransY] = this->fMat[kMTransY];
+ affine[SkMatrixPriv::kAScaleX] = this->fMat[kMScaleX];
+ affine[SkMatrixPriv::kASkewY] = this->fMat[kMSkewY];
+ affine[SkMatrixPriv::kASkewX] = this->fMat[kMSkewX];
+ affine[SkMatrixPriv::kAScaleY] = this->fMat[kMScaleY];
+ affine[SkMatrixPriv::kATransX] = this->fMat[kMTransX];
+ affine[SkMatrixPriv::kATransY] = this->fMat[kMTransY];
}
return true;
}