Remove SK_SUPPORT_LEGACY_BITMAP_SAMPLER_BIAS
No longer defined in Chromium.
R=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1568893002
Review URL: https://codereview.chromium.org/1568893002
diff --git a/src/core/SkBitmapProcState.h b/src/core/SkBitmapProcState.h
index 87bee35..3f1d699 100644
--- a/src/core/SkBitmapProcState.h
+++ b/src/core/SkBitmapProcState.h
@@ -198,17 +198,14 @@
SkIntToScalar(x) + SK_ScalarHalf,
SkIntToScalar(y) + SK_ScalarHalf, &pt);
-#ifndef SK_SUPPORT_LEGACY_BITMAP_SAMPLER_BIAS
// SkFixed epsilon bias to ensure inverse-mapped bitmap coordinates are rounded
// consistently WRT geometry. Note that we only need the bias for positive scales:
// for negative scales, the rounding is intrinsically correct.
// We scale it to persist SkFractionalInt -> SkFixed conversions.
- fX = SkScalarToFractionalInt(pt.x()) - SkFixedToFractionalInt(s.fInvMatrix.getScaleX() > 0);
- fY = SkScalarToFractionalInt(pt.y()) - SkFixedToFractionalInt(s.fInvMatrix.getScaleY() > 0);
-#else
- fX = SkScalarToFractionalInt(pt.x());
- fY = SkScalarToFractionalInt(pt.y());
-#endif
+ const SkFixed biasX = (s.fInvMatrix.getScaleX() > 0);
+ const SkFixed biasY = (s.fInvMatrix.getScaleY() > 0);
+ fX = SkScalarToFractionalInt(pt.x()) - SkFixedToFractionalInt(biasX);
+ fY = SkScalarToFractionalInt(pt.y()) - SkFixedToFractionalInt(biasY);
}
SkFractionalInt x() const { return fX; }