aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-06-06 12:10:26 +0000
committerGravatar caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-06-06 12:10:26 +0000
commit83ecdc3ac69c9208493c4c3fc8ea9f84b1350535 (patch)
tree61febf51c94f3d35f616fb0d8c87ed202c4a72a0
parent02939ce4bddd3223d9e8cc98d4abd02939b7f70a (diff)
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
-rw-r--r--src/opts/SkBlitRect_opts_SSE2.cpp24
-rw-r--r--src/opts/SkBlitRow_opts_SSE2.cpp1
-rw-r--r--src/opts/opts_check_SSE2.cpp2
3 files changed, 15 insertions, 12 deletions
diff --git a/src/opts/SkBlitRect_opts_SSE2.cpp b/src/opts/SkBlitRect_opts_SSE2.cpp
index 9336951f18..6d8a296472 100644
--- a/src/opts/SkBlitRect_opts_SSE2.cpp
+++ b/src/opts/SkBlitRect_opts_SSE2.cpp
@@ -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);
- //}
+ }
}
diff --git a/src/opts/SkBlitRow_opts_SSE2.cpp b/src/opts/SkBlitRow_opts_SSE2.cpp
index 8e4dd1d3c3..5bb0c8c102 100644
--- a/src/opts/SkBlitRow_opts_SSE2.cpp
+++ b/src/opts/SkBlitRow_opts_SSE2.cpp
@@ -7,6 +7,7 @@
#include "SkBlitRow_opts_SSE2.h"
+#include "SkBitmapProcState_opts_SSE2.h"
#include "SkColorPriv.h"
#include "SkUtils.h"
diff --git a/src/opts/opts_check_SSE2.cpp b/src/opts/opts_check_SSE2.cpp
index a839696a66..5da64120f1 100644
--- a/src/opts/opts_check_SSE2.cpp
+++ b/src/opts/opts_check_SSE2.cpp
@@ -223,6 +223,8 @@ SkMemset32Proc SkMemset32GetPlatformProc() {
}
}
+SkBlitRow::ColorRectProc PlatformColorRectProcFactory(); // suppress warning
+
SkBlitRow::ColorRectProc PlatformColorRectProcFactory() {
if (cachedHasSSE2()) {
return ColorRect32_SSE2;