diff options
author | caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-06-06 12:09:34 +0000 |
---|---|---|
committer | caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-06-06 12:09:34 +0000 |
commit | 803eceb6afd13f07416df0b4a9bb714e9370f081 (patch) | |
tree | 94cf7f5d543aec6cebe9ff0a7462283a80cca493 /src/core/SkAAClip.cpp | |
parent | 383d5d494992554cde776c8b5b359d30e431bc78 (diff) |
fix warnings on Mac in src/core
Fix these class of warnings:
- unused functions
- unused locals
- sign mismatch
- missing function prototypes
- missing newline at end of file
- 64 to 32 bit truncation
The changes prefer to link in dead code in the debug build
with 'if (false)' than to comment it out, but trivial cases
are commented out or sometimes deleted if it appears to be
a copy/paste error.
Review URL: https://codereview.appspot.com/6301046
git-svn-id: http://skia.googlecode.com/svn/trunk@4182 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkAAClip.cpp')
-rw-r--r-- | src/core/SkAAClip.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/core/SkAAClip.cpp b/src/core/SkAAClip.cpp index fe0fb286dc..86c99d8c0c 100644 --- a/src/core/SkAAClip.cpp +++ b/src/core/SkAAClip.cpp @@ -1055,6 +1055,9 @@ public: void validate() { #ifdef SK_DEBUG + if (false) { // avoid bit rot, suppress warning + test_count_left_right_zeros(); + } int prevY = -1; for (int i = 0; i < fRows.count(); ++i) { const Row& row = fRows[i]; @@ -1324,12 +1327,6 @@ typedef void (*RowProc)(SkAAClip::Builder&, int bottom, const uint8_t* rowA, const SkIRect& rectA, const uint8_t* rowB, const SkIRect& rectB); -static void sectRowProc(SkAAClip::Builder& builder, int bottom, - const uint8_t* rowA, const SkIRect& rectA, - const uint8_t* rowB, const SkIRect& rectB) { - -} - typedef U8CPU (*AlphaProc)(U8CPU alphaA, U8CPU alphaB); static U8CPU sectAlphaProc(U8CPU alphaA, U8CPU alphaB) { @@ -1434,6 +1431,7 @@ static void adjust_row(RowIter& iter, int& leftA, int& riteA, int rite) { } } +#if 0 // UNUSED static bool intersect(int& min, int& max, int boundsMin, int boundsMax) { SkASSERT(min < max); SkASSERT(boundsMin < boundsMax); @@ -1448,6 +1446,7 @@ static bool intersect(int& min, int& max, int boundsMin, int boundsMax) { } return true; } +#endif static void operatorX(SkAAClip::Builder& builder, int lastY, RowIter& iterA, RowIter& iterB, @@ -1975,8 +1974,8 @@ static inline uint16_t mergeOne(uint16_t value, unsigned alpha) { unsigned g = SkGetPackedG16(value); unsigned b = SkGetPackedB16(value); return SkPackRGB16(SkMulDiv255Round(r, alpha), - SkMulDiv255Round(r, alpha), - SkMulDiv255Round(r, alpha)); + SkMulDiv255Round(g, alpha), + SkMulDiv255Round(b, alpha)); } static inline SkPMColor mergeOne(SkPMColor value, unsigned alpha) { unsigned a = SkGetPackedA32(value); @@ -1992,7 +1991,6 @@ static inline SkPMColor mergeOne(SkPMColor value, unsigned alpha) { template <typename T> void mergeT(const T* SK_RESTRICT src, int srcN, const uint8_t* SK_RESTRICT row, int rowN, T* SK_RESTRICT dst) { - SkDEBUGCODE(int accumulated = 0;) for (;;) { SkASSERT(rowN > 0); SkASSERT(srcN > 0); |