Make skia almost compile again with clang.

clang is reporting many unused functions and variables.

R=bsalomon@google.com, robertphillips@google.com, reed@google.com

Author: tfarina@chromium.org

Review URL: https://codereview.chromium.org/26167002

git-svn-id: http://skia.googlecode.com/svn/trunk/src@11630 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/core/Sk64.cpp b/core/Sk64.cpp
index 7c195ce..54b3022 100644
--- a/core/Sk64.cpp
+++ b/core/Sk64.cpp
@@ -133,15 +133,6 @@
     }
 }
 
-////////////////////////////////////////////////////////////////
-
-static inline int32_t round_right_16(int32_t hi, uint32_t lo)
-{
-    uint32_t sum = lo + (1 << 15);
-    hi += (sum < lo);
-    return (hi << 16) | (sum >> 16);
-}
-
 SkBool Sk64::isFixed() const
 {
     Sk64 tmp = *this;
diff --git a/core/SkAAClip.cpp b/core/SkAAClip.cpp
index 6ab1c89..9669e6f 100644
--- a/core/SkAAClip.cpp
+++ b/core/SkAAClip.cpp
@@ -1381,17 +1381,6 @@
     }
 }
 
-static const uint8_t gEmptyRow[] = {
-    0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0,
-    0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0,
-    0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0,
-    0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0,
-    0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0,
-    0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0,
-    0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0,
-    0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0, 0xFF, 0,
-};
-
 class RowIter {
 public:
     RowIter(const uint8_t* row, const SkIRect& bounds) {
diff --git a/core/SkMatrix.cpp b/core/SkMatrix.cpp
index ff24ecf..3a5ab62 100644
--- a/core/SkMatrix.cpp
+++ b/core/SkMatrix.cpp
@@ -47,7 +47,6 @@
 
 #ifdef SK_SCALAR_IS_FLOAT
     static const int32_t kScalar1Int = 0x3f800000;
-    static const int32_t kPersp1Int  = 0x3f800000;
 #else
     #define scalarAsInt(x)  (x)
     static const int32_t kScalar1Int = (1 << 16);
diff --git a/core/SkQuadClipper.cpp b/core/SkQuadClipper.cpp
index a67a23f..fcde929 100644
--- a/core/SkQuadClipper.cpp
+++ b/core/SkQuadClipper.cpp
@@ -1,4 +1,3 @@
-
 /*
  * Copyright 2009 The Android Open Source Project
  *
@@ -6,22 +5,9 @@
  * found in the LICENSE file.
  */
 
-
 #include "SkQuadClipper.h"
 #include "SkGeometry.h"
 
-static inline void clamp_le(SkScalar& value, SkScalar max) {
-    if (value > max) {
-        value = max;
-    }
-}
-
-static inline void clamp_ge(SkScalar& value, SkScalar min) {
-    if (value < min) {
-        value = min;
-    }
-}
-
 SkQuadClipper::SkQuadClipper() {
     fClip.setEmpty();
 }
diff --git a/core/SkRTree.cpp b/core/SkRTree.cpp
index 95e4336..b6f8e95 100644
--- a/core/SkRTree.cpp
+++ b/core/SkRTree.cpp
@@ -1,4 +1,3 @@
-
 /*
  * Copyright 2012 Google Inc.
  *
@@ -12,8 +11,6 @@
 static inline uint32_t get_area(const SkIRect& rect);
 static inline uint32_t get_overlap(const SkIRect& rect1, const SkIRect& rect2);
 static inline uint32_t get_margin(const SkIRect& rect);
-static inline uint32_t get_overlap_increase(const SkIRect& rect1, const SkIRect& rect2,
-                                            SkIRect expandBy);
 static inline uint32_t get_area_increase(const SkIRect& rect1, SkIRect rect2);
 static inline void join_no_empty_check(const SkIRect& joinWith, SkIRect* out);
 
@@ -471,12 +468,6 @@
     return 2 * (rect.width() + rect.height());
 }
 
-static inline uint32_t get_overlap_increase(const SkIRect& rect1, const SkIRect& rect2,
-                                          SkIRect expandBy) {
-    join_no_empty_check(rect1, &expandBy);
-    return get_overlap(expandBy, rect2) - get_overlap(rect1, rect2);
-}
-
 static inline uint32_t get_area_increase(const SkIRect& rect1, SkIRect rect2) {
     join_no_empty_check(rect1, &rect2);
     return get_area(rect2) - get_area(rect1);
diff --git a/core/SkXfermode.cpp b/core/SkXfermode.cpp
index 6631495..8c6eb2c 100644
--- a/core/SkXfermode.cpp
+++ b/core/SkXfermode.cpp
@@ -61,13 +61,6 @@
     }
 }
 
-static inline int clamp_max(int value, int max) {
-    if (value > max) {
-        value = max;
-    }
-    return value;
-}
-
 ///////////////////////////////////////////////////////////////////////////////
 
 //  kClear_Mode,    //!< [0, 0]
diff --git a/utils/SkMatrix44.cpp b/utils/SkMatrix44.cpp
index 9803b52..c924723 100644
--- a/utils/SkMatrix44.cpp
+++ b/utils/SkMatrix44.cpp
@@ -406,18 +406,6 @@
 
 ///////////////////////////////////////////////////////////////////////////////
 
-static inline SkMScalar det2x2(double m00, double m01, double m10, double m11) {
-    return SkDoubleToMScalar(m00 * m11 - m10 * m01);
-}
-
-static inline double det3x3(double m00, double m01, double m02,
-                            double m10, double m11, double m12,
-                            double m20, double m21, double m22) {
-    return  m00 * det2x2(m11, m12, m21, m22) -
-    m10 * det2x2(m01, m02, m21, m22) +
-    m20 * det2x2(m01, m02, m11, m12);
-}
-
 /** We always perform the calculation in doubles, to avoid prematurely losing
     precision along the way. This relies on the compiler automatically
     promoting our SkMScalar values to double (if needed).
@@ -466,13 +454,6 @@
 
 ///////////////////////////////////////////////////////////////////////////////
 
-static inline double dabs(double x) {
-    if (x < 0) {
-        x = -x;
-    }
-    return x;
-}
-
 bool SkMatrix44::invert(SkMatrix44* inverse) const {
     if (this->isIdentity()) {
         if (inverse) {