aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkBitmapProcState.h
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2014-11-21 12:10:33 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2014-11-21 12:10:33 -0800
commit179465150939c2f2420bfc15dc33825b1130e7f7 (patch)
tree69db95e2af56f36551fafaae5bba199a5ee8dd66 /src/core/SkBitmapProcState.h
parent76b3ac9eff95e385e59ff2706b11facd695234fd (diff)
Switch SkBitmapProcState's SkFractionalInt to 32.32.
16 bits are not enough to hold the integral part of fx in Clamp_S32_opaque_D32_nofilter_DX_shaderproc. Weirdly, no GM diffs on my desktop. BUG=skia:3096 Review URL: https://codereview.chromium.org/733163003
Diffstat (limited to 'src/core/SkBitmapProcState.h')
-rw-r--r--src/core/SkBitmapProcState.h20
1 files changed, 5 insertions, 15 deletions
diff --git a/src/core/SkBitmapProcState.h b/src/core/SkBitmapProcState.h
index ac4f1a4710..dd1f0bff45 100644
--- a/src/core/SkBitmapProcState.h
+++ b/src/core/SkBitmapProcState.h
@@ -14,21 +14,11 @@
#include "SkMipMap.h"
#include "SkPaint.h"
-#define FractionalInt_IS_64BIT
-
-#ifdef FractionalInt_IS_64BIT
- typedef SkFixed48 SkFractionalInt;
- #define SkScalarToFractionalInt(x) SkScalarToFixed48(x)
- #define SkFractionalIntToFixed(x) SkFixed48ToFixed(x)
- #define SkFixedToFractionalInt(x) SkFixedToFixed48(x)
- #define SkFractionalIntToInt(x) SkFixed48ToInt(x)
-#else
- typedef SkFixed SkFractionalInt;
- #define SkScalarToFractionalInt(x) SkScalarToFixed(x)
- #define SkFractionalIntToFixed(x) (x)
- #define SkFixedToFractionalInt(x) (x)
- #define SkFractionalIntToInt(x) ((x) >> 16)
-#endif
+typedef SkFixed3232 SkFractionalInt;
+#define SkScalarToFractionalInt(x) SkScalarToFixed3232(x)
+#define SkFractionalIntToFixed(x) SkFixed3232ToFixed(x)
+#define SkFixedToFractionalInt(x) SkFixedToFixed3232(x)
+#define SkFractionalIntToInt(x) SkFixed3232ToInt(x)
class SkPaint;