aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkBitmapProcState_matrix.h
diff options
context:
space:
mode:
authorGravatar humper@google.com <humper@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-07-12 21:14:33 +0000
committerGravatar humper@google.com <humper@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-07-12 21:14:33 +0000
commitd64d8a905a044204c5960e29cdf8adf1f130edce (patch)
tree22523a4bb1944558f181e0db29dd3a360cc1fc6b /src/core/SkBitmapProcState_matrix.h
parent5383a7525355dec72efa2083aeadffdd09a962b9 (diff)
Working plumb of image scaling:
1) always generate mipmaps if we detect that we are downsampling. 2) pre-scale the image if we detect that we are upsampling (currently valid for scale+translate only) 3) A few miscellaneous bug fixes related to image scaling. Still need SSE/Neon versions of these image scalers. BUG= R=bsalomon@google.com, robertphillips@google.com Review URL: https://codereview.chromium.org/18978014 git-svn-id: http://skia.googlecode.com/svn/trunk@10056 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkBitmapProcState_matrix.h')
-rw-r--r--src/core/SkBitmapProcState_matrix.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core/SkBitmapProcState_matrix.h b/src/core/SkBitmapProcState_matrix.h
index cc65c2d801..d796d0b04c 100644
--- a/src/core/SkBitmapProcState_matrix.h
+++ b/src/core/SkBitmapProcState_matrix.h
@@ -55,7 +55,7 @@ void SCALE_NOFILTER_NAME(const SkBitmapProcState& s,
SkFractionalInt fx;
{
SkPoint pt;
- s.fInvProc(*s.fInvMatrix, SkIntToScalar(x) + SK_ScalarHalf,
+ s.fInvProc(s.fInvMatrix, SkIntToScalar(x) + SK_ScalarHalf,
SkIntToScalar(y) + SK_ScalarHalf, &pt);
fx = SkScalarToFractionalInt(pt.fY);
const unsigned maxY = s.fBitmap->height() - 1;
@@ -116,7 +116,7 @@ void AFFINE_NOFILTER_NAME(const SkBitmapProcState& s,
PREAMBLE(s);
SkPoint srcPt;
- s.fInvProc(*s.fInvMatrix,
+ s.fInvProc(s.fInvMatrix,
SkIntToScalar(x) + SK_ScalarHalf,
SkIntToScalar(y) + SK_ScalarHalf, &srcPt);
@@ -143,7 +143,7 @@ void PERSP_NOFILTER_NAME(const SkBitmapProcState& s,
int maxX = s.fBitmap->width() - 1;
int maxY = s.fBitmap->height() - 1;
- SkPerspIter iter(*s.fInvMatrix,
+ SkPerspIter iter(s.fInvMatrix,
SkIntToScalar(x) + SK_ScalarHalf,
SkIntToScalar(y) + SK_ScalarHalf, count);
@@ -188,7 +188,7 @@ void SCALE_FILTER_NAME(const SkBitmapProcState& s,
{
SkPoint pt;
- s.fInvProc(*s.fInvMatrix, SkIntToScalar(x) + SK_ScalarHalf,
+ 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;
@@ -222,7 +222,7 @@ void AFFINE_FILTER_NAME(const SkBitmapProcState& s,
PREAMBLE(s);
SkPoint srcPt;
- s.fInvProc(*s.fInvMatrix,
+ s.fInvProc(s.fInvMatrix,
SkIntToScalar(x) + SK_ScalarHalf,
SkIntToScalar(y) + SK_ScalarHalf, &srcPt);
@@ -254,7 +254,7 @@ void PERSP_FILTER_NAME(const SkBitmapProcState& s,
SkFixed oneX = s.fFilterOneX;
SkFixed oneY = s.fFilterOneY;
- SkPerspIter iter(*s.fInvMatrix,
+ SkPerspIter iter(s.fInvMatrix,
SkIntToScalar(x) + SK_ScalarHalf,
SkIntToScalar(y) + SK_ScalarHalf, count);