Index: src/core/SkBitmapProcState.h |
diff --git a/src/core/SkBitmapProcState.h b/src/core/SkBitmapProcState.h |
index e6e7a3f393661ff729a2abecde11d62950b5e6a6..51750baef77ab55ab5d7d2c2edb5236076f069f3 100644 |
--- a/src/core/SkBitmapProcState.h |
+++ b/src/core/SkBitmapProcState.h |
@@ -25,17 +25,6 @@ typedef SkFixed3232 SkFractionalInt; |
#define SkFixedToFractionalInt(x) SkFixedToFixed3232(x) |
#define SkFractionalIntToInt(x) SkFixed3232ToInt(x) |
-// Applying a fixed point (SkFixed, SkFractionalInt) epsilon bias ensures that the inverse-mapped |
-// bitmap coordinates are rounded consistently WRT geometry. Note that we only have to do this |
-// when the scale is positive - for negative scales we're already rounding in the right direction. |
-static inline int bitmap_sampler_inv_bias(SkScalar scale) { |
-#ifndef SK_SUPPORT_LEGACY_BITMAP_SAMPLER_BIAS |
- return -(scale > 0); |
-#else |
- return 0; |
-#endif |
-} |
- |
class SkPaint; |
struct SkBitmapProcState { |
@@ -87,6 +76,12 @@ struct SkBitmapProcState { |
SkPMColor fPaintPMColor; // chooseProcs - A8 config |
SkFixed fInvSx; // chooseProcs |
SkFixed fInvKy; // chooseProcs |
+ |
+ // Epsilon bias to ensure inverse-mapped bitmap coordinates are rounded consistently WRT |
+ // geometry. These are treated as SkFixed, but we only store the fractional part. |
reed1
2015/12/16 16:25:03
We just need 0 or 1 for each, right? why using int
f(malita)
2015/12/16 16:45:55
The current impl also expects an explicit sign. W
|
+ int16_t fInvBiasX; // chooseProcs |
+ int16_t fInvBiasY; // chooseProcs |
+ |
uint16_t fAlphaScale; // chooseProcs |
uint8_t fInvType; // chooseProcs |
uint8_t fTileModeX; // CONSTRUCTOR |