Revert of Properly enable S32_D16_filter_DX_SSE2 optimization. (https://codereview.chromium.org/239453010/)
Reason for revert: Broke GMs in 565 mode. To repro: out/Debug/gm --match filterbitmap_image_mandrill -w . --config 565 open filterbitmap_image_mandrill_512.png_565.png Original issue's description: > Properly enable S32_D16_filter_DX_SSE2 optimization. > > Currently, the S32_D16_filter_DX_SSE2 optimization is only used in > configurations where the maximum SSE level is SSE2. > This patch enables it for higher levels, as well. > Also, refactored the function a bit, to make future modifications > less error-prone. > > Author: henrik.smiding@intel.com > > Signed-off-by: Henrik Smiding <henrik.smiding@intel.com> > > Committed: http://code.google.com/p/skia/source/detail?r=14333 R=reed@google.com, mtklein@google.com, tomhudson@google.com, djsollen@google.com, joakim.landberg@intel.com, henrik.smiding@intel.com TBR=djsollen@google.com, henrik.smiding@intel.com, joakim.landberg@intel.com, mtklein@google.com, reed@google.com, tomhudson@google.com NOTREECHECKS=true NOTRY=true Author: bsalomon@google.com Review URL: https://codereview.chromium.org/246393013 git-svn-id: http://skia.googlecode.com/svn/trunk@14336 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
74e608cdc1
commit
c398f7156e
@ -123,57 +123,49 @@ void SkBitmapProcState::platformConvolutionProcs(SkConvolutionProcs* procs) {
|
||||
}
|
||||
|
||||
void SkBitmapProcState::platformProcs() {
|
||||
/* Every optimization in the function requires at least SSE2 */
|
||||
if (!cachedHasSSE2()) {
|
||||
return;
|
||||
if (cachedHasSSSE3()) {
|
||||
if (fSampleProc32 == S32_opaque_D32_filter_DX) {
|
||||
fSampleProc32 = S32_opaque_D32_filter_DX_SSSE3;
|
||||
} else if (fSampleProc32 == S32_alpha_D32_filter_DX) {
|
||||
fSampleProc32 = S32_alpha_D32_filter_DX_SSSE3;
|
||||
}
|
||||
|
||||
/* Check fSampleProc32 */
|
||||
if (fSampleProc32 == S32_opaque_D32_filter_DX) {
|
||||
if (cachedHasSSSE3()) {
|
||||
fSampleProc32 = S32_opaque_D32_filter_DX_SSSE3;
|
||||
} else {
|
||||
fSampleProc32 = S32_opaque_D32_filter_DX_SSE2;
|
||||
}
|
||||
} else if (fSampleProc32 == S32_opaque_D32_filter_DXDY) {
|
||||
if (cachedHasSSSE3()) {
|
||||
if (fSampleProc32 == S32_opaque_D32_filter_DXDY) {
|
||||
fSampleProc32 = S32_opaque_D32_filter_DXDY_SSSE3;
|
||||
}
|
||||
} else if (fSampleProc32 == S32_alpha_D32_filter_DX) {
|
||||
if (cachedHasSSSE3()) {
|
||||
fSampleProc32 = S32_alpha_D32_filter_DX_SSSE3;
|
||||
} else {
|
||||
fSampleProc32 = S32_alpha_D32_filter_DX_SSE2;
|
||||
}
|
||||
} else if (fSampleProc32 == S32_alpha_D32_filter_DXDY) {
|
||||
if (cachedHasSSSE3()) {
|
||||
fSampleProc32 = S32_alpha_D32_filter_DXDY_SSSE3;
|
||||
}
|
||||
} else if (cachedHasSSE2()) {
|
||||
if (fSampleProc32 == S32_opaque_D32_filter_DX) {
|
||||
fSampleProc32 = S32_opaque_D32_filter_DX_SSE2;
|
||||
} else if (fSampleProc32 == S32_alpha_D32_filter_DX) {
|
||||
fSampleProc32 = S32_alpha_D32_filter_DX_SSE2;
|
||||
}
|
||||
|
||||
/* Check fSampleProc16 */
|
||||
if (fSampleProc16 == S32_D16_filter_DX) {
|
||||
fSampleProc16 = S32_D16_filter_DX_SSE2;
|
||||
}
|
||||
}
|
||||
|
||||
/* Check fMatrixProc */
|
||||
if (cachedHasSSSE3() || cachedHasSSE2()) {
|
||||
if (fMatrixProc == ClampX_ClampY_filter_scale) {
|
||||
fMatrixProc = ClampX_ClampY_filter_scale_SSE2;
|
||||
} else if (fMatrixProc == ClampX_ClampY_nofilter_scale) {
|
||||
fMatrixProc = ClampX_ClampY_nofilter_scale_SSE2;
|
||||
} else if (fMatrixProc == ClampX_ClampY_filter_affine) {
|
||||
}
|
||||
|
||||
if (fMatrixProc == ClampX_ClampY_filter_affine) {
|
||||
fMatrixProc = ClampX_ClampY_filter_affine_SSE2;
|
||||
} else if (fMatrixProc == ClampX_ClampY_nofilter_affine) {
|
||||
fMatrixProc = ClampX_ClampY_nofilter_affine_SSE2;
|
||||
}
|
||||
|
||||
/* Check fShaderProc32 */
|
||||
if (c_hqfilter_sse) {
|
||||
if (fShaderProc32 == highQualityFilter32) {
|
||||
fShaderProc32 = highQualityFilter_SSE2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static SkBlitRow::Proc platform_16_procs[] = {
|
||||
S32_D565_Opaque_SSE2, // S32_D565_Opaque
|
||||
|
Loading…
Reference in New Issue
Block a user