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

Unified Diff: include/core/SkScalar.h

Issue 15879003: remove outdated debugging code now that we no longer support fixed point (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 7 months 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkScalar.h
diff --git a/include/core/SkScalar.h b/include/core/SkScalar.h
index a699fe9a99ab44d9ff21849e3a98d2affc0fb54c..2dd7a6283f1122f2627176db46c227ee0b138767 100644
--- a/include/core/SkScalar.h
+++ b/include/core/SkScalar.h
@@ -67,47 +67,9 @@
return prod == prod;
}
-#ifdef SK_DEBUG
- /** SkIntToScalar(n) returns its integer argument as an SkScalar
- *
- * If we're compiling in DEBUG mode, and can thus afford some extra runtime
- * cycles, check to make sure that the parameter passed in has not already
- * been converted to SkScalar. (A double conversion like this is harmless
- * for SK_SCALAR_IS_FLOAT, but for SK_SCALAR_IS_FIXED this causes trouble.)
- *
- * Note that we need all of these method signatures to properly handle the
- * various types that we pass into SkIntToScalar() to date:
- * int, size_t, U8CPU, etc., even though what we really mean is "anything
- * but a float".
- */
- static inline float SkIntToScalar(signed int param) {
- return (float)param;
- }
- static inline float SkIntToScalar(unsigned int param) {
- return (float)param;
- }
- static inline float SkIntToScalar(signed long param) {
- return (float)param;
- }
- static inline float SkIntToScalar(unsigned long param) {
- return (float)param;
- }
- static inline float SkIntToScalar(float /* param */) {
- /* If the parameter passed into SkIntToScalar is a float,
- * one of two things has happened:
- * 1. the parameter was an SkScalar (which is typedef'd to float)
- * 2. the parameter was a float instead of an int
- *
- * Either way, it's not good.
- */
- SkDEBUGFAIL("looks like you passed an SkScalar into SkIntToScalar");
- return (float)0;
- }
-#else // not SK_DEBUG
/** SkIntToScalar(n) returns its integer argument as an SkScalar
*/
#define SkIntToScalar(n) ((float)(n))
-#endif // not SK_DEBUG
/** SkFixedToScalar(n) returns its SkFixed argument as an SkScalar
*/
#define SkFixedToScalar(x) SkFixedToFloat(x)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698