aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-10-07 15:52:15 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-10-07 15:52:15 +0000
commitd5321726466185dce9ae92126044b944f51b3c83 (patch)
treed047723417301c6158502df68ca5411071b21b4d
parent67d7fb4e89d91a63d54426ac63d8e5c253521a59 (diff)
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@11630 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r--src/core/Sk64.cpp9
-rw-r--r--src/core/SkAAClip.cpp11
-rw-r--r--src/core/SkMatrix.cpp1
-rw-r--r--src/core/SkQuadClipper.cpp14
-rw-r--r--src/core/SkRTree.cpp9
-rw-r--r--src/core/SkXfermode.cpp7
-rw-r--r--src/utils/SkMatrix44.cpp19
7 files changed, 0 insertions, 70 deletions
diff --git a/src/core/Sk64.cpp b/src/core/Sk64.cpp
index 7c195ce4fe..54b30221c9 100644
--- a/src/core/Sk64.cpp
+++ b/src/core/Sk64.cpp
@@ -133,15 +133,6 @@ void Sk64::abs()
}
}
-////////////////////////////////////////////////////////////////
-
-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/src/core/SkAAClip.cpp b/src/core/SkAAClip.cpp
index 6ab1c89d02..9669e6fb4b 100644
--- a/src/core/SkAAClip.cpp
+++ b/src/core/SkAAClip.cpp
@@ -1381,17 +1381,6 @@ static AlphaProc find_alpha_proc(SkRegion::Op op) {
}
}
-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/src/core/SkMatrix.cpp b/src/core/SkMatrix.cpp
index ff24ecfb03..3a5ab62219 100644
--- a/src/core/SkMatrix.cpp
+++ b/src/core/SkMatrix.cpp
@@ -47,7 +47,6 @@ enum {
#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/src/core/SkQuadClipper.cpp b/src/core/SkQuadClipper.cpp
index a67a23f939..fcde929ea7 100644
--- a/src/core/SkQuadClipper.cpp
+++ b/src/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/src/core/SkRTree.cpp b/src/core/SkRTree.cpp
index 95e4336ac7..b6f8e95dea 100644
--- a/src/core/SkRTree.cpp
+++ b/src/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 @@ static inline uint32_t get_margin(const SkIRect& rect) {
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/src/core/SkXfermode.cpp b/src/core/SkXfermode.cpp
index 66314958cc..8c6eb2ca68 100644
--- a/src/core/SkXfermode.cpp
+++ b/src/core/SkXfermode.cpp
@@ -61,13 +61,6 @@ static inline int clamp_div255round(int prod) {
}
}
-static inline int clamp_max(int value, int max) {
- if (value > max) {
- value = max;
- }
- return value;
-}
-
///////////////////////////////////////////////////////////////////////////////
// kClear_Mode, //!< [0, 0]
diff --git a/src/utils/SkMatrix44.cpp b/src/utils/SkMatrix44.cpp
index 9803b52095..c9247235db 100644
--- a/src/utils/SkMatrix44.cpp
+++ b/src/utils/SkMatrix44.cpp
@@ -406,18 +406,6 @@ void SkMatrix44::setConcat(const SkMatrix44& a, const SkMatrix44& b) {
///////////////////////////////////////////////////////////////////////////////
-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 @@ double SkMatrix44::determinant() const {
///////////////////////////////////////////////////////////////////////////////
-static inline double dabs(double x) {
- if (x < 0) {
- x = -x;
- }
- return x;
-}
-
bool SkMatrix44::invert(SkMatrix44* inverse) const {
if (this->isIdentity()) {
if (inverse) {