Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(947)

Unified Diff: experimental/SkSetPoly3To3_A.cpp

Issue 117053002: remove SK_SCALAR_IS_[FLOAT,FIXED] and assume floats (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « bench/benchmain.cpp ('k') | gm/blurs.cpp » ('j') | src/core/SkCanvas.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: experimental/SkSetPoly3To3_A.cpp
diff --git a/experimental/SkSetPoly3To3_A.cpp b/experimental/SkSetPoly3To3_A.cpp
index 9eb6b33c0dffeb5e259e5e0d903bc4f3fc9873f2..18777a77b5bce989e33f812b4d9ca850a1aed986 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);
« no previous file with comments | « bench/benchmain.cpp ('k') | gm/blurs.cpp » ('j') | src/core/SkCanvas.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698