diff options
author | fmalita <fmalita@chromium.org> | 2016-01-07 07:58:10 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-01-07 07:58:10 -0800 |
commit | c070d1514ace6b672d5dbaaa3090d27698400f1f (patch) | |
tree | ffadc48f6afda6d84e97793039e72b1f024919da /src/core/SkBitmapProcState.h | |
parent | 247415969a9a5ed6c83cc09395472416c4b7de7f (diff) |
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
Diffstat (limited to 'src/core/SkBitmapProcState.h')
-rw-r--r-- | src/core/SkBitmapProcState.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/core/SkBitmapProcState.h b/src/core/SkBitmapProcState.h index 87bee35a25..3f1d699cf2 100644 --- a/src/core/SkBitmapProcState.h +++ b/src/core/SkBitmapProcState.h @@ -198,17 +198,14 @@ public: 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; } |