diff options
author | 2013-01-07 16:47:43 +0000 | |
---|---|---|
committer | 2013-01-07 16:47:43 +0000 | |
commit | 05af1afd429808913683da75644e48bece12e820 (patch) | |
tree | b7f0ec33f2cbbb9312deb9e0e566c8bea4a97320 /src/core/SkConfig8888.h | |
parent | 30454293fd4fae81238c582c18232692bff32b1e (diff) |
eliminate all warnings in non-thirdparty code on mac
Most of these issues were due to functions whose definitions appear in header files; I changed those functions to be 'static inline' instead of just 'static' or 'inline', which kills the warning for such functions.
Other functions that were static or anonymous-namespaced but were unused in cpp files were probably called at some point but are no longer; someone who knows more than I do should probably scrub all the functions I either deleted or #if 0'ed out and make sure that the right thing is happening here.
Lots of unused variables removed, and one nasty const issue handled.
There remains a single warning in thirdparty/externals/cityhash/src/city.cc on line 146 related to a signed/unsigned mismatch. I don't know if we have control over this library so I didn't fix this one, but perhaps someone could do something about that one.
BUG=
Review URL: https://codereview.appspot.com/7067044
git-svn-id: http://skia.googlecode.com/svn/trunk@7051 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkConfig8888.h')
-rw-r--r-- | src/core/SkConfig8888.h | 31 |
1 files changed, 9 insertions, 22 deletions
diff --git a/src/core/SkConfig8888.h b/src/core/SkConfig8888.h index a8913702d6..96eaef2447 100644 --- a/src/core/SkConfig8888.h +++ b/src/core/SkConfig8888.h @@ -31,34 +31,17 @@ uint32_t SkPackConfig8888(SkCanvas::Config8888 config, uint32_t g, uint32_t b); +/////////////////////////////////////////////////////////////////////////////// +// Implementation + namespace { /** Copies all pixels from a bitmap to a dst ptr with a given rowBytes and Config8888. The bitmap must have kARGB_8888_Config. */ -inline void SkCopyBitmapToConfig8888(uint32_t* dstPixels, - size_t dstRowBytes, - SkCanvas::Config8888 dstConfig8888, - const SkBitmap& srcBmp); - -/** - Copies over all pixels in a bitmap from a src ptr with a given rowBytes and - Config8888. The bitmap must have pixels and be kARGB_8888_Config. - */ -inline void SkCopyConfig8888ToBitmap(const SkBitmap& dstBmp, - const uint32_t* srcPixels, - size_t srcRowBytes, - SkCanvas::Config8888 srcConfig8888); -} - -/////////////////////////////////////////////////////////////////////////////// -// Implementation - -namespace { - -inline void SkCopyBitmapToConfig8888(uint32_t* dstPixels, +static inline void SkCopyBitmapToConfig8888(uint32_t* dstPixels, size_t dstRowBytes, SkCanvas::Config8888 dstConfig8888, const SkBitmap& srcBmp) { @@ -72,7 +55,11 @@ inline void SkCopyBitmapToConfig8888(uint32_t* dstPixels, SkConvertConfig8888Pixels(dstPixels, dstRowBytes, dstConfig8888, srcPixels, srcRowBytes, SkCanvas::kNative_Premul_Config8888, w, h); } -inline void SkCopyConfig8888ToBitmap(const SkBitmap& dstBmp, +/** + Copies over all pixels in a bitmap from a src ptr with a given rowBytes and + Config8888. The bitmap must have pixels and be kARGB_8888_Config. + */ +static inline void SkCopyConfig8888ToBitmap(const SkBitmap& dstBmp, const uint32_t* srcPixels, size_t srcRowBytes, SkCanvas::Config8888 srcConfig8888) { |