summaryrefslogtreecommitdiffstats
path: root/core/jni/android/graphics/Bitmap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/jni/android/graphics/Bitmap.cpp')
-rwxr-xr-xcore/jni/android/graphics/Bitmap.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/jni/android/graphics/Bitmap.cpp b/core/jni/android/graphics/Bitmap.cpp
index d7eef6e..61a34e5 100755
--- a/core/jni/android/graphics/Bitmap.cpp
+++ b/core/jni/android/graphics/Bitmap.cpp
@@ -43,8 +43,11 @@ static void FromColor_D32(void* dst, const SkColor src[], int width,
static void FromColor_D32_Raw(void* dst, const SkColor src[], int width,
int, int) {
+ // Needed to thwart the unreachable code detection from clang.
+ static const bool sk_color_ne_zero = SK_COLOR_MATCHES_PMCOLOR_BYTE_ORDER;
+
// SkColor's ordering may be different from SkPMColor
- if (SK_COLOR_MATCHES_PMCOLOR_BYTE_ORDER) {
+ if (sk_color_ne_zero) {
memcpy(dst, src, width * sizeof(SkColor));
return;
}