diff options
Diffstat (limited to 'core/jni/android/graphics/Bitmap.cpp')
-rwxr-xr-x | core/jni/android/graphics/Bitmap.cpp | 5 |
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; } |