Remove SK_SUPPORT_LEGACY_SCALAR_MAPPOINTS

No longer used in Chromium.

Also drop now-unused SkMatrix::Rot_pts() & SkMatrix::RotTrans_pts().

BUG=475022
R=reed@google.com,mtklein@google.com

Review URL: https://codereview.chromium.org/1071833002
This commit is contained in:
fmalita 2015-04-09 06:13:15 -07:00 committed by Commit bot
parent 7d1b945da6
commit f57546ec7f
2 changed files with 0 additions and 55 deletions

View File

@ -797,9 +797,6 @@ private:
static void Scale_pts(const SkMatrix&, SkPoint dst[], const SkPoint[], int);
static void ScaleTrans_pts(const SkMatrix&, SkPoint dst[], const SkPoint[],
int count);
static void Rot_pts(const SkMatrix&, SkPoint dst[], const SkPoint[], int);
static void RotTrans_pts(const SkMatrix&, SkPoint dst[], const SkPoint[],
int count);
static void Persp_pts(const SkMatrix&, SkPoint dst[], const SkPoint[], int);
static void Affine_vpts(const SkMatrix&, SkPoint dst[], const SkPoint[], int);

View File

@ -937,53 +937,6 @@ void SkMatrix::Scale_pts(const SkMatrix& m, SkPoint dst[], const SkPoint src[],
}
}
void SkMatrix::Rot_pts(const SkMatrix& m, SkPoint dst[],
const SkPoint src[], int count) {
SkASSERT((m.getType() & (kPerspective_Mask | kTranslate_Mask)) == 0);
if (count > 0) {
SkScalar mx = m.fMat[kMScaleX];
SkScalar my = m.fMat[kMScaleY];
SkScalar kx = m.fMat[kMSkewX];
SkScalar ky = m.fMat[kMSkewY];
do {
SkScalar sy = src->fY;
SkScalar sx = src->fX;
src += 1;
dst->fY = sdot(sx, ky, sy, my);
dst->fX = sdot(sx, mx, sy, kx);
dst += 1;
} while (--count);
}
}
void SkMatrix::RotTrans_pts(const SkMatrix& m, SkPoint dst[],
const SkPoint src[], int count) {
SkASSERT(!m.hasPerspective());
if (count > 0) {
SkScalar mx = m.fMat[kMScaleX];
SkScalar my = m.fMat[kMScaleY];
SkScalar kx = m.fMat[kMSkewX];
SkScalar ky = m.fMat[kMSkewY];
SkScalar tx = m.fMat[kMTransX];
SkScalar ty = m.fMat[kMTransY];
do {
SkScalar sy = src->fY;
SkScalar sx = src->fX;
src += 1;
#ifdef SK_LEGACY_MATRIX_MATH_ORDER
dst->fY = sx * ky + (sy * my + ty);
dst->fX = sx * mx + (sy * kx + tx);
#else
dst->fY = sdot(sx, ky, sy, my) + ty;
dst->fX = sdot(sx, mx, sy, kx) + tx;
#endif
dst += 1;
} while (--count);
}
}
void SkMatrix::Persp_pts(const SkMatrix& m, SkPoint dst[],
const SkPoint src[], int count) {
SkASSERT(m.hasPerspective());
@ -1045,13 +998,8 @@ void SkMatrix::Affine_vpts(const SkMatrix& m, SkPoint dst[], const SkPoint src[]
const SkMatrix::MapPtsProc SkMatrix::gMapPtsProcs[] = {
SkMatrix::Identity_pts, SkMatrix::Trans_pts,
SkMatrix::Scale_pts, SkMatrix::Scale_pts,
#ifdef SK_SUPPORT_LEGACY_SCALAR_MAPPOINTS
SkMatrix::Rot_pts, SkMatrix::RotTrans_pts,
SkMatrix::Rot_pts, SkMatrix::RotTrans_pts,
#else
SkMatrix::Affine_vpts, SkMatrix::Affine_vpts,
SkMatrix::Affine_vpts, SkMatrix::Affine_vpts,
#endif
// repeat the persp proc 8 times
SkMatrix::Persp_pts, SkMatrix::Persp_pts,
SkMatrix::Persp_pts, SkMatrix::Persp_pts,