Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(892)

Unified Diff: src/opts/opts_check_x86.cpp

Issue 289473009: Add SSE4 optimization of S32A_Opaque_Blitrow (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix deferred test case for Valgrind Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/opts/SkBlitRow_opts_SSE4_x64_asm.S ('k') | tests/DeferredCanvasTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/opts/opts_check_x86.cpp
diff --git a/src/opts/opts_check_x86.cpp b/src/opts/opts_check_x86.cpp
index 6af47729cd06a59bd973c0e8621c7dcddc5d6268..b94969890d1f540e982d696452fc772286d3c84f 100644
--- a/src/opts/opts_check_x86.cpp
+++ b/src/opts/opts_check_x86.cpp
@@ -12,6 +12,7 @@
#include "SkBlitRect_opts_SSE2.h"
#include "SkBlitRow.h"
#include "SkBlitRow_opts_SSE2.h"
+#include "SkBlitRow_opts_SSE4.h"
#include "SkBlurImage_opts_SSE2.h"
#include "SkMorphology_opts.h"
#include "SkMorphology_opts_SSE2.h"
@@ -82,6 +83,8 @@ static int get_SIMD_level() {
getcpuid(1, cpu_info);
if ((cpu_info[2] & (1<<20)) != 0) {
return SK_CPU_SSE_LEVEL_SSE42;
+ } else if ((cpu_info[2] & (1<<19)) != 0) {
+ return SK_CPU_SSE_LEVEL_SSE41;
} else if ((cpu_info[2] & (1<<9)) != 0) {
return SK_CPU_SSE_LEVEL_SSSE3;
} else if ((cpu_info[3] & (1<<26)) != 0) {
@@ -206,16 +209,30 @@ SkBlitRow::Proc SkBlitRow::PlatformProcs565(unsigned flags) {
}
}
-static SkBlitRow::Proc32 platform_32_procs[] = {
+static SkBlitRow::Proc32 platform_32_procs_SSE2[] = {
NULL, // S32_Opaque,
S32_Blend_BlitRow32_SSE2, // S32_Blend,
S32A_Opaque_BlitRow32_SSE2, // S32A_Opaque
S32A_Blend_BlitRow32_SSE2, // S32A_Blend,
};
+#if defined(SK_ATT_ASM_SUPPORTED)
+static SkBlitRow::Proc32 platform_32_procs_SSE4[] = {
+ NULL, // S32_Opaque,
+ S32_Blend_BlitRow32_SSE2, // S32_Blend,
+ S32A_Opaque_BlitRow32_SSE4_asm, // S32A_Opaque
+ S32A_Blend_BlitRow32_SSE2, // S32A_Blend,
+};
+#endif
+
SkBlitRow::Proc32 SkBlitRow::PlatformProcs32(unsigned flags) {
+#if defined(SK_ATT_ASM_SUPPORTED)
+ if (supports_simd(SK_CPU_SSE_LEVEL_SSE41)) {
+ return platform_32_procs_SSE4[flags];
+ } else
+#endif
if (supports_simd(SK_CPU_SSE_LEVEL_SSE2)) {
- return platform_32_procs[flags];
+ return platform_32_procs_SSE2[flags];
} else {
return NULL;
}
« no previous file with comments | « src/opts/SkBlitRow_opts_SSE4_x64_asm.S ('k') | tests/DeferredCanvasTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698