From fa3d892f2e3beba39ccb9957be78aad529521740 Mon Sep 17 00:00:00 2001 From: "reed@google.com" Date: Mon, 30 Jul 2012 20:26:06 +0000 Subject: [PATCH] remove outdated test code for TEST_SRC_ALPHA Review URL: https://codereview.appspot.com/6457056 git-svn-id: http://skia.googlecode.com/svn/trunk@4840 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/core/SkBlitRow_D32.cpp | 14 -------------- src/opts/SkBlitRow_opts_arm.cpp | 17 ----------------- 2 files changed, 31 deletions(-) diff --git a/src/core/SkBlitRow_D32.cpp b/src/core/SkBlitRow_D32.cpp index 7ed07f3..c2cb855 100644 --- a/src/core/SkBlitRow_D32.cpp +++ b/src/core/SkBlitRow_D32.cpp @@ -53,8 +53,6 @@ static void S32_Blend_BlitRow32(SkPMColor* SK_RESTRICT dst, } } -//#define TEST_SRC_ALPHA - static void S32A_Opaque_BlitRow32(SkPMColor* SK_RESTRICT dst, const SkPMColor* SK_RESTRICT src, int count, U8CPU alpha) { @@ -76,19 +74,7 @@ static void S32A_Opaque_BlitRow32(SkPMColor* SK_RESTRICT dst, } #else do { -#ifdef TEST_SRC_ALPHA - SkPMColor sc = *src; - if (sc) { - unsigned srcA = SkGetPackedA32(sc); - SkPMColor result = sc; - if (srcA != 255) { - result = SkPMSrcOver(sc, *dst); - } - *dst = result; - } -#else *dst = SkPMSrcOver(*src, *dst); -#endif src += 1; dst += 1; } while (--count > 0); diff --git a/src/opts/SkBlitRow_opts_arm.cpp b/src/opts/SkBlitRow_opts_arm.cpp index cec1e9d..5280829 100644 --- a/src/opts/SkBlitRow_opts_arm.cpp +++ b/src/opts/SkBlitRow_opts_arm.cpp @@ -530,19 +530,7 @@ static void S32A_Opaque_BlitRow32_neon(SkPMColor* SK_RESTRICT dst, /* do any residual iterations */ while (--count >= 0) { -#ifdef TEST_SRC_ALPHA - SkPMColor sc = *src; - if (sc) { - unsigned srcA = SkGetPackedA32(sc); - SkPMColor result = sc; - if (srcA != 255) { - result = SkPMSrcOver(sc, *dst); - } - *dst = result; - } -#else *dst = SkPMSrcOver(*src, *dst); -#endif src += 1; dst += 1; } @@ -553,17 +541,12 @@ static void S32A_Opaque_BlitRow32_neon(SkPMColor* SK_RESTRICT dst, #else -#ifdef TEST_SRC_ALPHA -#error The ARM asm version of S32A_Opaque_BlitRow32 does not support TEST_SRC_ALPHA -#endif - static void S32A_Opaque_BlitRow32_arm(SkPMColor* SK_RESTRICT dst, const SkPMColor* SK_RESTRICT src, int count, U8CPU alpha) { SkASSERT(255 == alpha); - /* Does not support the TEST_SRC_ALPHA case */ asm volatile ( "cmp %[count], #0 \n\t" /* comparing count with 0 */ "beq 3f \n\t" /* if zero exit */ -- 2.7.4