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

Unified Diff: src/opts/opts_check_x86.cpp

Issue 892623002: Add SSE optimization of Color32A_D565 (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fixed VS warning Created 5 years, 10 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.cpp ('k') | no next file » | 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 84a4913021bb7b60057f18f8305f639ca725dcf0..2d3b794283dd85cf5d3c346eb58231844543bf73 100644
--- a/src/opts/opts_check_x86.cpp
+++ b/src/opts/opts_check_x86.cpp
@@ -197,7 +197,7 @@ void SkBitmapProcState::platformProcs() {
////////////////////////////////////////////////////////////////////////////////
-static SkBlitRow::Proc16 platform_16_procs[] = {
+static const SkBlitRow::Proc16 platform_16_procs[] = {
S32_D565_Opaque_SSE2, // S32_D565_Opaque
NULL, // S32_D565_Blend
S32A_D565_Opaque_SSE2, // S32A_D565_Opaque
@@ -216,18 +216,27 @@ SkBlitRow::Proc16 SkBlitRow::PlatformFactory565(unsigned flags) {
}
}
+static const SkBlitRow::ColorProc16 platform_565_colorprocs_SSE4[] = {
+ Color32A_D565_SSE4, // Color32A_D565,
+ NULL, // Color32A_D565_Dither
+};
+
SkBlitRow::ColorProc16 SkBlitRow::PlatformColorFactory565(unsigned flags) {
- return NULL;
+ if (supports_simd(SK_CPU_SSE_LEVEL_SSE41)) {
+ return platform_565_colorprocs_SSE4[flags];
+ } else {
+ return NULL;
+ }
}
-static SkBlitRow::Proc32 platform_32_procs_SSE2[] = {
+static const 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,
};
-static SkBlitRow::Proc32 platform_32_procs_SSE4[] = {
+static const SkBlitRow::Proc32 platform_32_procs_SSE4[] = {
NULL, // S32_Opaque,
S32_Blend_BlitRow32_SSE2, // S32_Blend,
S32A_Opaque_BlitRow32_SSE4, // S32A_Opaque
« no previous file with comments | « src/opts/SkBlitRow_opts_SSE4.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698