Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(790)

Unified Diff: src/opts/SkBitmapProcState_opts_SSE2.cpp

Issue 18978014: Working plumb of image scaling: (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: nits from robert Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/opts/SkBitmapProcState_matrix_repeat_neon.h ('k') | src/opts/SkBitmapProcState_opts_SSSE3.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/opts/SkBitmapProcState_opts_SSE2.cpp
diff --git a/src/opts/SkBitmapProcState_opts_SSE2.cpp b/src/opts/SkBitmapProcState_opts_SSE2.cpp
index 4bba8c3298f9785a2ef62cd5cbfb9192c2447c31..0c84d00d1ef222d3d1fa3bf0179027111150245c 100644
--- a/src/opts/SkBitmapProcState_opts_SSE2.cpp
+++ b/src/opts/SkBitmapProcState_opts_SSE2.cpp
@@ -15,7 +15,7 @@ void S32_opaque_D32_filter_DX_SSE2(const SkBitmapProcState& s,
const uint32_t* xy,
int count, uint32_t* colors) {
SkASSERT(count > 0 && colors != NULL);
- SkASSERT(s.fDoFilter);
+ SkASSERT(s.fFilterQuality != SkBitmapProcState::kNone_BitmapFilter);
SkASSERT(s.fBitmap->config() == SkBitmap::kARGB_8888_Config);
SkASSERT(s.fAlphaScale == 256);
@@ -121,7 +121,7 @@ void S32_alpha_D32_filter_DX_SSE2(const SkBitmapProcState& s,
const uint32_t* xy,
int count, uint32_t* colors) {
SkASSERT(count > 0 && colors != NULL);
- SkASSERT(s.fDoFilter);
+ SkASSERT(s.fFilterQuality != SkBitmapProcState::kNone_BitmapFilter);
SkASSERT(s.fBitmap->config() == SkBitmap::kARGB_8888_Config);
SkASSERT(s.fAlphaScale < 256);
@@ -255,8 +255,8 @@ void ClampX_ClampY_filter_scale_SSE2(const SkBitmapProcState& s, uint32_t xy[],
SkFixed fx;
SkPoint pt;
- s.fInvProc(*s.fInvMatrix, SkIntToScalar(x) + SK_ScalarHalf,
- SkIntToScalar(y) + SK_ScalarHalf, &pt);
+ 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;
// compute our two Y values up front
@@ -376,8 +376,8 @@ void ClampX_ClampY_nofilter_scale_SSE2(const SkBitmapProcState& s,
const unsigned maxX = s.fBitmap->width() - 1;
SkFixed fx;
SkPoint pt;
- s.fInvProc(*s.fInvMatrix, SkIntToScalar(x) + SK_ScalarHalf,
- SkIntToScalar(y) + SK_ScalarHalf, &pt);
+ s.fInvProc(s.fInvMatrix, SkIntToScalar(x) + SK_ScalarHalf,
+ SkIntToScalar(y) + SK_ScalarHalf, &pt);
fx = SkScalarToFixed(pt.fY);
const unsigned maxY = s.fBitmap->height() - 1;
*xy++ = SkClampMax(fx >> 16, maxY);
@@ -490,7 +490,7 @@ void ClampX_ClampY_nofilter_scale_SSE2(const SkBitmapProcState& s,
void ClampX_ClampY_filter_affine_SSE2(const SkBitmapProcState& s,
uint32_t xy[], int count, int x, int y) {
SkPoint srcPt;
- s.fInvProc(*s.fInvMatrix,
+ s.fInvProc(s.fInvMatrix,
SkIntToScalar(x) + SK_ScalarHalf,
SkIntToScalar(y) + SK_ScalarHalf, &srcPt);
@@ -566,7 +566,7 @@ void ClampX_ClampY_nofilter_affine_SSE2(const SkBitmapProcState& s,
SkMatrix::kAffine_Mask)) == 0);
SkPoint srcPt;
- s.fInvProc(*s.fInvMatrix,
+ s.fInvProc(s.fInvMatrix,
SkIntToScalar(x) + SK_ScalarHalf,
SkIntToScalar(y) + SK_ScalarHalf, &srcPt);
@@ -641,7 +641,7 @@ void S32_D16_filter_DX_SSE2(const SkBitmapProcState& s,
const uint32_t* xy,
int count, uint16_t* colors) {
SkASSERT(count > 0 && colors != NULL);
- SkASSERT(s.fDoFilter);
+ SkASSERT(s.fFilterQuality != SkBitmapProcState::kNone_BitmapFilter);
SkASSERT(s.fBitmap->config() == SkBitmap::kARGB_8888_Config);
SkASSERT(s.fBitmap->isOpaque());
« no previous file with comments | « src/opts/SkBitmapProcState_matrix_repeat_neon.h ('k') | src/opts/SkBitmapProcState_opts_SSSE3.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698