aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkBitmapProcState_shaderproc.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_shaderproc.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_shaderproc.h')
-rw-r--r--src/core/SkBitmapProcState_shaderproc.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/SkBitmapProcState_shaderproc.h b/src/core/SkBitmapProcState_shaderproc.h
index 6b8f74aedd..d765b8e92d 100644
--- a/src/core/SkBitmapProcState_shaderproc.h
+++ b/src/core/SkBitmapProcState_shaderproc.h
@@ -21,7 +21,7 @@ void SCALE_FILTER_NAME(const SkBitmapProcState& s, int x, int y,
SkMatrix::kScale_Mask)) == 0);
SkASSERT(s.fInvKy == 0);
SkASSERT(count > 0 && colors != NULL);
- SkASSERT(s.fDoFilter);
+ SkASSERT(s.fFilterQuality != SkBitmapProcState::kNone_BitmapFilter);
SkDEBUGCODE(CHECKSTATE(s);)
const unsigned maxX = s.fBitmap->width() - 1;
@@ -34,7 +34,7 @@ void SCALE_FILTER_NAME(const SkBitmapProcState& s, int x, int y,
{
SkPoint pt;
- s.fInvProc(*s.fInvMatrix, SkIntToScalar(x) + SK_ScalarHalf,
+ s.fInvProc(s.fInvMatrix, SkIntToScalar(x) + SK_ScalarHalf,
SkIntToScalar(y) + SK_ScalarHalf, &pt);
SkFixed fy = SkScalarToFixed(pt.fY) - (s.fFilterOneY >> 1);
const unsigned maxY = s.fBitmap->height() - 1;