aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkBitmapProcState.cpp
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2016-01-20 08:12:02 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-01-20 08:12:02 -0800
commitbf361d3ba2ed9cd5a3da827ca0f7ef0d44b50410 (patch)
tree5fec438cfd7c39cf834c9759614b8f00e42dbdb2 /src/core/SkBitmapProcState.cpp
parentb59d1bc7a8596f346d57a9cfcd461dddc6d75edb (diff)
remove fragile assert
The assert basically wants the following to always be true (but it aint) floor(int + 0.5 + float) == floor(0.5 + float) + int ... where int + 0.5 happens first, and then we add the float. BUG=skia:4825 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1609873003 Review URL: https://codereview.chromium.org/1609873003
Diffstat (limited to 'src/core/SkBitmapProcState.cpp')
-rw-r--r--src/core/SkBitmapProcState.cpp24
1 files changed, 0 insertions, 24 deletions
diff --git a/src/core/SkBitmapProcState.cpp b/src/core/SkBitmapProcState.cpp
index d097d8ea2e..cb9027c98a 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);