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

Unified Diff: src/core/SkBitmapProcState.cpp

Issue 1609873003: remove fragile assert (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBitmapProcState.cpp
diff --git a/src/core/SkBitmapProcState.cpp b/src/core/SkBitmapProcState.cpp
index d097d8ea2edefa21e053411c22caaec5f7688140..cb9027c98a72a020a39d5ec79b137d3181b39c78 100644
--- a/src/core/SkBitmapProcState.cpp
+++ b/src/core/SkBitmapProcState.cpp
@@ -375,18 +375,6 @@ static void Clamp_S32_D32_nofilter_trans_shaderproc(const void* sIn,
const int maxY = s.fPixmap.height() - 1;
int ix = s.fFilterOneX + x;
int iy = SkClampMax(s.fFilterOneY + y, maxY);
-#ifdef SK_DEBUG
- {
- SkPoint pt;
- s.fInvProc(s.fInvMatrix, SkIntToScalar(x) + SK_ScalarHalf,
- SkIntToScalar(y) + SK_ScalarHalf, &pt);
- int iy2 = SkClampMax(SkScalarFloorToInt(pt.fY), maxY);
- int ix2 = SkScalarFloorToInt(pt.fX);
-
- SkASSERT(iy == iy2);
- SkASSERT(ix == ix2);
- }
-#endif
const SkPMColor* row = s.fPixmap.addr32(0, iy);
// clamp to the left
@@ -450,18 +438,6 @@ static void Repeat_S32_D32_nofilter_trans_shaderproc(const void* sIn,
const int stopY = s.fPixmap.height();
int ix = s.fFilterOneX + x;
int iy = sk_int_mod(s.fFilterOneY + y, stopY);
-#ifdef SK_DEBUG
- {
- SkPoint pt;
- s.fInvProc(s.fInvMatrix, SkIntToScalar(x) + SK_ScalarHalf,
- SkIntToScalar(y) + SK_ScalarHalf, &pt);
- int iy2 = sk_int_mod(SkScalarFloorToInt(pt.fY), stopY);
- int ix2 = SkScalarFloorToInt(pt.fX);
-
- SkASSERT(iy == iy2);
- SkASSERT(ix == ix2);
- }
-#endif
const SkPMColor* row = s.fPixmap.addr32(0, iy);
ix = sk_int_mod(ix, stopX);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698