| Index: src/opts/SkBitmapProcState_matrix_neon.h
|
| diff --git a/src/opts/SkBitmapProcState_matrix_neon.h b/src/opts/SkBitmapProcState_matrix_neon.h
|
| index 72bf1bce3365842c535e79160f1c0c5c4c6422ad..fbb2a1e00b5e53834cc06f77d25b113e398bc0a6 100644
|
| --- a/src/opts/SkBitmapProcState_matrix_neon.h
|
| +++ b/src/opts/SkBitmapProcState_matrix_neon.h
|
| @@ -1,7 +1,12 @@
|
| +/*
|
| + * Copyright 2014 Google Inc.
|
| + *
|
| + * Use of this source code is governed by a BSD-style license that can be
|
| + * found in the LICENSE file.
|
| + */
|
|
|
| #include <arm_neon.h>
|
|
|
| -
|
| #define SCALE_NOFILTER_NAME MAKENAME(_nofilter_scale)
|
| #define SCALE_FILTER_NAME MAKENAME(_filter_scale)
|
| #define AFFINE_NOFILTER_NAME MAKENAME(_nofilter_affine)
|
| @@ -30,14 +35,14 @@ static void SCALE_NOFILTER_NAME(const SkBitmapProcState& s,
|
| PREAMBLE(s);
|
|
|
| // we store y, x, x, x, x, x
|
| - const unsigned maxX = s.fBitmap->width() - 1;
|
| + const unsigned maxX = s.fPixmap.width() - 1;
|
| SkFractionalInt fx;
|
| {
|
| SkPoint pt;
|
| s.fInvProc(s.fInvMatrix, SkIntToScalar(x) + SK_ScalarHalf,
|
| SkIntToScalar(y) + SK_ScalarHalf, &pt);
|
| fx = SkScalarToFractionalInt(pt.fY);
|
| - const unsigned maxY = s.fBitmap->height() - 1;
|
| + const unsigned maxY = s.fPixmap.height() - 1;
|
| *xy++ = TILEY_PROCF(SkFractionalIntToFixed(fx), maxY);
|
| fx = SkScalarToFractionalInt(pt.fX);
|
| }
|
| @@ -122,8 +127,8 @@ static void AFFINE_NOFILTER_NAME(const SkBitmapProcState& s,
|
| SkFractionalInt fy = SkScalarToFractionalInt(srcPt.fY);
|
| SkFractionalInt dx = s.fInvSxFractionalInt;
|
| SkFractionalInt dy = s.fInvKyFractionalInt;
|
| - int maxX = s.fBitmap->width() - 1;
|
| - int maxY = s.fBitmap->height() - 1;
|
| + int maxX = s.fPixmap.width() - 1;
|
| + int maxY = s.fPixmap.height() - 1;
|
|
|
| if (count >= 8) {
|
| SkFractionalInt dx4 = dx * 4;
|
| @@ -187,8 +192,8 @@ static void PERSP_NOFILTER_NAME(const SkBitmapProcState& s,
|
|
|
| PREAMBLE(s);
|
| // max{X,Y} are int here, but later shown/assumed to fit in 16 bits
|
| - int maxX = s.fBitmap->width() - 1;
|
| - int maxY = s.fBitmap->height() - 1;
|
| + int maxX = s.fPixmap.width() - 1;
|
| + int maxY = s.fPixmap.height() - 1;
|
|
|
| SkPerspIter iter(s.fInvMatrix,
|
| SkIntToScalar(x) + SK_ScalarHalf,
|
| @@ -293,7 +298,7 @@ static void SCALE_FILTER_NAME(const SkBitmapProcState& s,
|
|
|
| PREAMBLE(s);
|
|
|
| - const unsigned maxX = s.fBitmap->width() - 1;
|
| + const unsigned maxX = s.fPixmap.width() - 1;
|
| const SkFixed one = s.fFilterOneX;
|
| const SkFractionalInt dx = s.fInvSxFractionalInt;
|
| SkFractionalInt fx;
|
| @@ -303,7 +308,7 @@ static void SCALE_FILTER_NAME(const SkBitmapProcState& s,
|
| s.fInvProc(s.fInvMatrix, SkIntToScalar(x) + SK_ScalarHalf,
|
| SkIntToScalar(y) + SK_ScalarHalf, &pt);
|
| const SkFixed fy = SkScalarToFixed(pt.fY) - (s.fFilterOneY >> 1);
|
| - const unsigned maxY = s.fBitmap->height() - 1;
|
| + const unsigned maxY = s.fPixmap.height() - 1;
|
| // compute our two Y values up front
|
| *xy++ = PACK_FILTER_Y_NAME(fy, maxY, s.fFilterOneY PREAMBLE_ARG_Y);
|
| // now initialize fx
|
| @@ -369,8 +374,8 @@ static void AFFINE_FILTER_NAME(const SkBitmapProcState& s,
|
| SkFixed fy = SkScalarToFixed(srcPt.fY) - (oneY >> 1);
|
| SkFixed dx = s.fInvSx;
|
| SkFixed dy = s.fInvKy;
|
| - unsigned maxX = s.fBitmap->width() - 1;
|
| - unsigned maxY = s.fBitmap->height() - 1;
|
| + unsigned maxX = s.fPixmap.width() - 1;
|
| + unsigned maxY = s.fPixmap.height() - 1;
|
|
|
| if (count >= 4) {
|
| int32x4_t wide_fy, wide_fx;
|
| @@ -420,8 +425,8 @@ static void PERSP_FILTER_NAME(const SkBitmapProcState& s,
|
| SkASSERT(s.fInvType & SkMatrix::kPerspective_Mask);
|
|
|
| PREAMBLE(s);
|
| - unsigned maxX = s.fBitmap->width() - 1;
|
| - unsigned maxY = s.fBitmap->height() - 1;
|
| + unsigned maxX = s.fPixmap.width() - 1;
|
| + unsigned maxY = s.fPixmap.height() - 1;
|
| SkFixed oneX = s.fFilterOneX;
|
| SkFixed oneY = s.fFilterOneY;
|
|
|
|
|