aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-05-23 16:41:42 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-05-23 16:41:42 +0000
commitabcec6db9b1efa28a6f4d902cb1fba01e6b38d56 (patch)
tree20bb7a29b6710f6ba3f722bf8b91ef4b173c3dac
parent0f2b1953c7a8f8bb5a25d573dd9e215eaa10a2f8 (diff)
remove outdated debugging code now that we no longer support fixed point
R=reed@google.com, djsollen@google.com Author: djsollen@google.com Review URL: https://chromiumcodereview.appspot.com/15879003 git-svn-id: http://skia.googlecode.com/svn/trunk@9258 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r--include/core/SkScalar.h38
1 files changed, 0 insertions, 38 deletions
diff --git a/include/core/SkScalar.h b/include/core/SkScalar.h
index a699fe9a99..2dd7a6283f 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)