aboutsummaryrefslogtreecommitdiffhomepage
path: root/experimental
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-12-17 16:44:46 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-12-17 16:44:46 +0000
commit8f4d2306fa866a26f9448048ff63f692b2ba43aa (patch)
tree7a48d817cb5220f87e81781320b002eead2495a0 /experimental
parenta34b638b909f58dd7c66546a0f49923112f7f785 (diff)
remove SK_SCALAR_IS_[FLOAT,FIXED] and assume floats
To keep the CL (slightly) managable, this does not make any changes to existing macros (e.g. SkScalarMul). Just tackling #ifdef constructs this time around. BUG= R=bsalomon@google.com, caryclark@google.com Review URL: https://codereview.chromium.org/117053002 git-svn-id: http://skia.googlecode.com/svn/trunk@12712 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'experimental')
-rw-r--r--experimental/SkSetPoly3To3_A.cpp29
1 files changed, 7 insertions, 22 deletions
diff --git a/experimental/SkSetPoly3To3_A.cpp b/experimental/SkSetPoly3To3_A.cpp
index 9eb6b33c0d..18777a77b5 100644
--- a/experimental/SkSetPoly3To3_A.cpp
+++ b/experimental/SkSetPoly3To3_A.cpp
@@ -10,29 +10,14 @@
// FIXME: needs to be in a header
bool SkSetPoly3To3_A(SkMatrix* matrix, const SkPoint src[3], const SkPoint dst[3]);
-#ifdef SK_SCALAR_IS_FIXED
- typedef int64_t SkDScalar;
-
- static SkScalar SkDScalar_toScalar(SkDScalar value) {
- SkDScalar result = (value + (1 << 15)) >> 16;
- int top = result >> 31;
- SkASSERT(top == 0 || top == -1);
- return (SkScalar)result;
- }
- static SkScalar divide(SkDScalar numer, SkDScalar denom) {
- denom >>= 16;
- return numer / denom;
- }
-#else
- typedef double SkDScalar;
+typedef double SkDScalar;
- static SkScalar SkDScalar_toScalar(SkDScalar value) {
- return static_cast<float>(value);
- }
- static SkScalar divide(SkDScalar numer, SkDScalar denom) {
- return static_cast<float>(numer / denom);
- }
-#endif
+static SkScalar SkDScalar_toScalar(SkDScalar value) {
+ return static_cast<float>(value);
+}
+static SkScalar divide(SkDScalar numer, SkDScalar denom) {
+ return static_cast<float>(numer / denom);
+}
static SkDScalar SkDScalar_setMul(SkScalar a, SkScalar b) {
return (SkDScalar) ((SkDScalar) a * b);