Revert of Add SSSE3 acceleration for S32_D16_filter_DXDY (patchset #3 id:40001 of https://codereview.chromium.org/773753002/)

Reason for revert:
breaks build when not using SSE3, since the two method definitions differ in parameter types (typo)

Original issue's description:
> Add SSSE3 acceleration for S32_D16_filter_DXDY
>
> With this CL, related nanobench can be improved for 565 config.
>                 bitmap_BGRA_8888_scale_rotate_bilerp     115us -> 70.5us       0.61x
> bitmap_BGRA_8888_update_volatile_scale_rotate_bilerp     115us -> 70.5us       0.61x
>          bitmap_BGRA_8888_update_scale_rotate_bilerp     112us ->   68us       0.6x
>
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/45a05780867a06b9f8a8d5240cf6c5d5a2c15a35

TBR=mtklein@google.com,qkmiao@gmail.com,qiankun.miao@intel.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/761103003
This commit is contained in:
jam 2014-12-03 15:56:36 -08:00 committed by Commit bot
parent c3a6eb2348
commit 9da051ad41
4 changed files with 12 additions and 39 deletions

View File

@ -204,8 +204,6 @@ void ClampX_ClampY_nofilter_affine(const SkBitmapProcState& s,
uint32_t xy[], int count, int x, int y); uint32_t xy[], int count, int x, int y);
void S32_D16_filter_DX(const SkBitmapProcState& s, void S32_D16_filter_DX(const SkBitmapProcState& s,
const uint32_t* xy, int count, uint16_t* colors); const uint32_t* xy, int count, uint16_t* colors);
void S32_D16_filter_DXDY(const SkBitmapProcState& s,
const uint32_t* xy, int count, uint16_t* colors);
void highQualityFilter32(const SkBitmapProcState &s, int x, int y, void highQualityFilter32(const SkBitmapProcState &s, int x, int y,
SkPMColor *SK_RESTRICT colors, int count); SkPMColor *SK_RESTRICT colors, int count);

View File

@ -6,7 +6,6 @@
*/ */
#include "SkBitmapProcState_opts_SSSE3.h" #include "SkBitmapProcState_opts_SSSE3.h"
#include "SkColorPriv.h"
#include "SkPaint.h" #include "SkPaint.h"
#include "SkUtils.h" #include "SkUtils.h"
@ -732,17 +731,6 @@ void S32_alpha_D32_filter_DXDY_SSSE3(const SkBitmapProcState& s,
S32_generic_D32_filter_DXDY_SSSE3<true>(s, xy, count, colors); S32_generic_D32_filter_DXDY_SSSE3<true>(s, xy, count, colors);
} }
void S32_D16_filter_DXDY_SSSE3(const SkBitmapProcState& s,
const uint32_t* xy,
int count, uint16_t* colors) {
SkASSERT(64 >= count);
SkAutoSTMalloc<64, uint32_t> colors32(count);
S32_generic_D32_filter_DXDY_SSSE3<false>(s, xy, count, colors32);
for(int i = 0; i < count; i++) {
*colors++ = SkPixel32ToPixel16(colors32[i]);
}
}
#else // SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSSE3 #else // SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSSE3
void S32_opaque_D32_filter_DX_SSSE3(const SkBitmapProcState& s, void S32_opaque_D32_filter_DX_SSSE3(const SkBitmapProcState& s,
@ -769,10 +757,4 @@ void S32_alpha_D32_filter_DXDY_SSSE3(const SkBitmapProcState& s,
sk_throw(); sk_throw();
} }
void S32_D16_filter_DXDY_SSSE3(const SkBitmapProcState& s,
const uint32_t* xy,
int count, uint32_t* colors) {
sk_throw();
}
#endif #endif

View File

@ -23,8 +23,4 @@ void S32_alpha_D32_filter_DXDY_SSSE3(const SkBitmapProcState& s,
const uint32_t* xy, const uint32_t* xy,
int count, uint32_t* colors); int count, uint32_t* colors);
void S32_D16_filter_DXDY_SSSE3(const SkBitmapProcState& s,
const uint32_t* xy,
int count, uint16_t* colors);
#endif #endif

View File

@ -149,27 +149,26 @@ void SkBitmapProcState::platformProcs() {
if (!supports_simd(SK_CPU_SSE_LEVEL_SSE2)) { if (!supports_simd(SK_CPU_SSE_LEVEL_SSE2)) {
return; return;
} }
const bool ssse3 = supports_simd(SK_CPU_SSE_LEVEL_SSSE3);
/* Check fSampleProc32 */ /* Check fSampleProc32 */
if (fSampleProc32 == S32_opaque_D32_filter_DX) { if (fSampleProc32 == S32_opaque_D32_filter_DX) {
if (ssse3) { if (supports_simd(SK_CPU_SSE_LEVEL_SSSE3)) {
fSampleProc32 = S32_opaque_D32_filter_DX_SSSE3; fSampleProc32 = S32_opaque_D32_filter_DX_SSSE3;
} else { } else {
fSampleProc32 = S32_opaque_D32_filter_DX_SSE2; fSampleProc32 = S32_opaque_D32_filter_DX_SSE2;
} }
} else if (fSampleProc32 == S32_opaque_D32_filter_DXDY) { } else if (fSampleProc32 == S32_opaque_D32_filter_DXDY) {
if (ssse3) { if (supports_simd(SK_CPU_SSE_LEVEL_SSSE3)) {
fSampleProc32 = S32_opaque_D32_filter_DXDY_SSSE3; fSampleProc32 = S32_opaque_D32_filter_DXDY_SSSE3;
} }
} else if (fSampleProc32 == S32_alpha_D32_filter_DX) { } else if (fSampleProc32 == S32_alpha_D32_filter_DX) {
if (ssse3) { if (supports_simd(SK_CPU_SSE_LEVEL_SSSE3)) {
fSampleProc32 = S32_alpha_D32_filter_DX_SSSE3; fSampleProc32 = S32_alpha_D32_filter_DX_SSSE3;
} else { } else {
fSampleProc32 = S32_alpha_D32_filter_DX_SSE2; fSampleProc32 = S32_alpha_D32_filter_DX_SSE2;
} }
} else if (fSampleProc32 == S32_alpha_D32_filter_DXDY) { } else if (fSampleProc32 == S32_alpha_D32_filter_DXDY) {
if (ssse3) { if (supports_simd(SK_CPU_SSE_LEVEL_SSSE3)) {
fSampleProc32 = S32_alpha_D32_filter_DXDY_SSSE3; fSampleProc32 = S32_alpha_D32_filter_DXDY_SSSE3;
} }
} }
@ -177,8 +176,6 @@ void SkBitmapProcState::platformProcs() {
/* Check fSampleProc16 */ /* Check fSampleProc16 */
if (fSampleProc16 == S32_D16_filter_DX) { if (fSampleProc16 == S32_D16_filter_DX) {
fSampleProc16 = S32_D16_filter_DX_SSE2; fSampleProc16 = S32_D16_filter_DX_SSE2;
} else if (ssse3 && fSampleProc16 == S32_D16_filter_DXDY) {
fSampleProc16 = S32_D16_filter_DXDY_SSSE3;
} }
/* Check fMatrixProc */ /* Check fMatrixProc */