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

Unified Diff: src/opts/SkBitmapFilter_opts_SSE2.cpp

Issue 18721006: fix trivial matrix computation (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: 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/gpu/GrAAHairLinePathRenderer.cpp ('k') | src/opts/SkBitmapProcState_matrix_clamp_neon.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/opts/SkBitmapFilter_opts_SSE2.cpp
diff --git a/src/opts/SkBitmapFilter_opts_SSE2.cpp b/src/opts/SkBitmapFilter_opts_SSE2.cpp
index 685ec77f49f9d908afef189154d122f8b7cfead0..f992bcb636c36a13e7440ad409acc9e5058f4f25 100644
--- a/src/opts/SkBitmapFilter_opts_SSE2.cpp
+++ b/src/opts/SkBitmapFilter_opts_SSE2.cpp
@@ -55,7 +55,7 @@ void highQualityFilter_SSE2(const SkBitmapProcState& s, int x, int y,
while (count-- > 0) {
SkPoint srcPt;
- s.fInvProc(*s.fInvMatrix, SkIntToScalar(x),
+ s.fInvProc(s.fInvMatrix, SkIntToScalar(x),
SkIntToScalar(y), &srcPt);
srcPt.fX -= SK_ScalarHalf;
srcPt.fY -= SK_ScalarHalf;
@@ -72,10 +72,10 @@ void highQualityFilter_SSE2(const SkBitmapProcState& s, int x, int y,
int x1 = SkTMin(maxX, int(floor(sx+s.getBitmapFilter()->width() + 0.5f)));
for (int src_y = y0; src_y <= y1; src_y++) {
- float yweight = s.getBitmapFilter()->lookupFloat( (srcPt.fY - src_y) );
+ float yweight = SkScalarToFloat(s.getBitmapFilter()->lookupScalar(srcPt.fY - src_y));
for (int src_x = x0; src_x <= x1 ; src_x++) {
- float xweight = s.getBitmapFilter()->lookupFloat( (srcPt.fX - src_x) );
+ float xweight = SkScalarToFloat(s.getBitmapFilter()->lookupScalar(srcPt.fX - src_x));
float combined_weight = xweight * yweight;
@@ -118,7 +118,7 @@ void highQualityFilter_ScaleOnly_SSE2(const SkBitmapProcState &s, int x, int y,
const int maxY = s.fBitmap->height() - 1;
SkPoint srcPt;
- s.fInvProc(*s.fInvMatrix, SkIntToScalar(x),
+ s.fInvProc(s.fInvMatrix, SkIntToScalar(x),
SkIntToScalar(y), &srcPt);
srcPt.fY -= SK_ScalarHalf;
int sy = SkScalarFloorToInt(srcPt.fY);
@@ -139,10 +139,10 @@ void highQualityFilter_ScaleOnly_SSE2(const SkBitmapProcState &s, int x, int y,
int x1 = SkTMin(maxX, int(floor(sx+s.getBitmapFilter()->width() + 0.5f)));
for (int src_y = y0; src_y <= y1; src_y++) {
- float yweight = s.getBitmapFilter()->lookupFloat( (srcPt.fY - src_y) );
+ float yweight = SkScalarToFloat(s.getBitmapFilter()->lookupScalar(srcPt.fY - src_y));
for (int src_x = x0; src_x <= x1 ; src_x++) {
- float xweight = s.getBitmapFilter()->lookupFloat( (srcPt.fX - src_x) );
+ float xweight = SkScalarToFloat(s.getBitmapFilter()->lookupScalar(srcPt.fX - src_x));
float combined_weight = xweight * yweight;
@@ -175,7 +175,7 @@ void highQualityFilter_ScaleOnly_SSE2(const SkBitmapProcState &s, int x, int y,
x++;
- s.fInvProc(*s.fInvMatrix, SkIntToScalar(x),
+ s.fInvProc(s.fInvMatrix, SkIntToScalar(x),
SkIntToScalar(y), &srcPt);
}
« no previous file with comments | « src/gpu/GrAAHairLinePathRenderer.cpp ('k') | src/opts/SkBitmapProcState_matrix_clamp_neon.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698