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

Unified Diff: src/pdf/SkPDFTypes.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
Index: src/pdf/SkPDFTypes.cpp
diff --git a/src/pdf/SkPDFTypes.cpp b/src/pdf/SkPDFTypes.cpp
index 55871c507d2fc99c62ed4504a3390ad9dd36c837..aafad79c4464e93d48d2b391298ea7ea263608b6 100644
--- a/src/pdf/SkPDFTypes.cpp
+++ b/src/pdf/SkPDFTypes.cpp
@@ -140,12 +140,6 @@ void SkPDFScalar::Append(SkScalar value, SkWStream* stream) {
// When using floats that are outside the whole value range, we can use
// integers instead.
-
-#if defined(SK_SCALAR_IS_FIXED)
- stream->writeScalarAsText(value);
- return;
-#endif // SK_SCALAR_IS_FIXED
-
#if !defined(SK_ALLOW_LARGE_PDF_SCALARS)
if (value > 32767 || value < -32767) {
stream->writeDecAsText(SkScalarRound(value));
@@ -158,7 +152,7 @@ void SkPDFScalar::Append(SkScalar value, SkWStream* stream) {
return;
#endif // !SK_ALLOW_LARGE_PDF_SCALARS
-#if defined(SK_SCALAR_IS_FLOAT) && defined(SK_ALLOW_LARGE_PDF_SCALARS)
+#if defined(SK_ALLOW_LARGE_PDF_SCALARS)
// Floats have 24bits of significance, so anything outside that range is
// no more precise than an int. (Plus PDF doesn't support scientific
// notation, so this clamps to SK_Max/MinS32).
@@ -185,7 +179,7 @@ void SkPDFScalar::Append(SkScalar value, SkWStream* stream) {
}
stream->writeText(buffer);
return;
-#endif // SK_SCALAR_IS_FLOAT && SK_ALLOW_LARGE_PDF_SCALARS
+#endif // SK_ALLOW_LARGE_PDF_SCALARS
}
SkPDFString::SkPDFString(const char value[])

Powered by Google App Engine
This is Rietveld 408576698