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
This commit is contained in:
commit-bot@chromium.org 2013-10-07 15:52:15 +00:00
parent 67d7fb4e89
commit d532172646
7 changed files with 0 additions and 70 deletions

View File

@ -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;

View File

@ -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) {

View File

@ -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);

View File

@ -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();
}

View File

@ -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);

View File

@ -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]

View File

@ -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) {