fix warnings on Mac in src/opts
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/6303045 git-svn-id: http://skia.googlecode.com/svn/trunk@4184 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
02939ce4bd
commit
83ecdc3ac6
@ -14,7 +14,7 @@
|
||||
/** Simple blitting of opaque rectangles less than 31 pixels wide:
|
||||
inlines and merges sections of Color32_SSE2 and sk_memset32_SSE2.
|
||||
*/
|
||||
void BlitRect32_OpaqueNarrow_SSE2(SkPMColor* SK_RESTRICT destination,
|
||||
static void BlitRect32_OpaqueNarrow_SSE2(SkPMColor* SK_RESTRICT destination,
|
||||
int width, int height,
|
||||
size_t rowBytes, uint32_t color) {
|
||||
SkASSERT(255 == SkGetPackedA32(color));
|
||||
@ -48,7 +48,7 @@ void BlitRect32_OpaqueNarrow_SSE2(SkPMColor* SK_RESTRICT destination,
|
||||
A 31 pixel rectangle is guaranteed to have at least one
|
||||
16-pixel aligned span that can take advantage of mm_store.
|
||||
*/
|
||||
void BlitRect32_OpaqueWide_SSE2(SkPMColor* SK_RESTRICT destination,
|
||||
static void BlitRect32_OpaqueWide_SSE2(SkPMColor* SK_RESTRICT destination,
|
||||
int width, int height,
|
||||
size_t rowBytes, uint32_t color) {
|
||||
SkASSERT(255 == SkGetPackedA32(color));
|
||||
@ -118,16 +118,16 @@ void ColorRect32_SSE2(SkPMColor* destination,
|
||||
return;
|
||||
}
|
||||
unsigned colorA = SkGetPackedA32(color);
|
||||
//if (255 == colorA) {
|
||||
//if (width < 31) {
|
||||
//BlitRect32_OpaqueNarrow_SSE2(destination, width, height,
|
||||
//rowBytes, color);
|
||||
//} else {
|
||||
//BlitRect32_OpaqueWide_SSE2(destination, width, height,
|
||||
//rowBytes, color);
|
||||
//}
|
||||
//} else {
|
||||
if (false && 255 == colorA) { // disabled but compilable to suppress warning
|
||||
if (width < 31) {
|
||||
BlitRect32_OpaqueNarrow_SSE2(destination, width, height,
|
||||
rowBytes, color);
|
||||
} else {
|
||||
BlitRect32_OpaqueWide_SSE2(destination, width, height,
|
||||
rowBytes, color);
|
||||
}
|
||||
} else {
|
||||
SkBlitRow::ColorRect32(destination, width, height, rowBytes, color);
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7,6 +7,7 @@
|
||||
|
||||
|
||||
#include "SkBlitRow_opts_SSE2.h"
|
||||
#include "SkBitmapProcState_opts_SSE2.h"
|
||||
#include "SkColorPriv.h"
|
||||
#include "SkUtils.h"
|
||||
|
||||
|
@ -223,6 +223,8 @@ SkMemset32Proc SkMemset32GetPlatformProc() {
|
||||
}
|
||||
}
|
||||
|
||||
SkBlitRow::ColorRectProc PlatformColorRectProcFactory(); // suppress warning
|
||||
|
||||
SkBlitRow::ColorRectProc PlatformColorRectProcFactory() {
|
||||
if (cachedHasSSE2()) {
|
||||
return ColorRect32_SSE2;
|
||||
|
Loading…
Reference in New Issue
Block a user