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

Side by Side 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: Created 6 years, 7 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2009 The Android Open Source Project 2 * Copyright 2009 The Android Open Source Project
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkBitmapFilter_opts_SSE2.h" 8 #include "SkBitmapFilter_opts_SSE2.h"
9 #include "SkBitmapProcState_opts_SSE2.h" 9 #include "SkBitmapProcState_opts_SSE2.h"
10 #include "SkBitmapProcState_opts_SSSE3.h" 10 #include "SkBitmapProcState_opts_SSSE3.h"
11 #include "SkBlitMask.h" 11 #include "SkBlitMask.h"
12 #include "SkBlitRect_opts_SSE2.h" 12 #include "SkBlitRect_opts_SSE2.h"
13 #include "SkBlitRow.h" 13 #include "SkBlitRow.h"
14 #include "SkBlitRow_opts_SSE2.h" 14 #include "SkBlitRow_opts_SSE2.h"
15 #include "SkBlitRow_opts_SSE4.h"
15 #include "SkBlurImage_opts_SSE2.h" 16 #include "SkBlurImage_opts_SSE2.h"
16 #include "SkMorphology_opts.h" 17 #include "SkMorphology_opts.h"
17 #include "SkMorphology_opts_SSE2.h" 18 #include "SkMorphology_opts_SSE2.h"
18 #include "SkRTConf.h" 19 #include "SkRTConf.h"
19 #include "SkUtils.h" 20 #include "SkUtils.h"
20 #include "SkUtils_opts_SSE2.h" 21 #include "SkUtils_opts_SSE2.h"
21 #include "SkXfermode.h" 22 #include "SkXfermode.h"
22 #include "SkXfermode_proccoeff.h" 23 #include "SkXfermode_proccoeff.h"
23 24
24 #if defined(_MSC_VER) && defined(_WIN64) 25 #if defined(_MSC_VER) && defined(_WIN64)
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 }; 200 };
200 201
201 SkBlitRow::Proc SkBlitRow::PlatformProcs565(unsigned flags) { 202 SkBlitRow::Proc SkBlitRow::PlatformProcs565(unsigned flags) {
202 if (supports_simd(SK_CPU_SSE_LEVEL_SSE2)) { 203 if (supports_simd(SK_CPU_SSE_LEVEL_SSE2)) {
203 return platform_16_procs[flags]; 204 return platform_16_procs[flags];
204 } else { 205 } else {
205 return NULL; 206 return NULL;
206 } 207 }
207 } 208 }
208 209
209 static SkBlitRow::Proc32 platform_32_procs[] = { 210 static SkBlitRow::Proc32 platform_32_procs_SSE2[] = {
210 NULL, // S32_Opaque, 211 NULL, // S32_Opaque,
211 S32_Blend_BlitRow32_SSE2, // S32_Blend, 212 S32_Blend_BlitRow32_SSE2, // S32_Blend,
212 S32A_Opaque_BlitRow32_SSE2, // S32A_Opaque 213 S32A_Opaque_BlitRow32_SSE2, // S32A_Opaque
213 S32A_Blend_BlitRow32_SSE2, // S32A_Blend, 214 S32A_Blend_BlitRow32_SSE2, // S32A_Blend,
214 }; 215 };
215 216
217 #if !defined(_MSC_VER)
218 static SkBlitRow::Proc32 platform_32_procs_SSE4[] = {
219 NULL, // S32_Opaque,
220 S32_Blend_BlitRow32_SSE2, // S32_Blend,
221 S32A_Opaque_BlitRow32_SSE4_asm, // S32A_Opaque
222 S32A_Blend_BlitRow32_SSE2, // S32A_Blend,
223 };
224 #endif
225
216 SkBlitRow::Proc32 SkBlitRow::PlatformProcs32(unsigned flags) { 226 SkBlitRow::Proc32 SkBlitRow::PlatformProcs32(unsigned flags) {
227 #if !defined(_MSC_VER)
228 if (supports_simd(SK_CPU_SSE_LEVEL_SSE42)) {
229 return platform_32_procs_SSE4[flags];
230 } else
231 #endif
217 if (supports_simd(SK_CPU_SSE_LEVEL_SSE2)) { 232 if (supports_simd(SK_CPU_SSE_LEVEL_SSE2)) {
218 return platform_32_procs[flags]; 233 return platform_32_procs_SSE2[flags];
219 } else { 234 } else {
220 return NULL; 235 return NULL;
221 } 236 }
222 } 237 }
223 238
224 SkBlitRow::ColorProc SkBlitRow::PlatformColorProc() { 239 SkBlitRow::ColorProc SkBlitRow::PlatformColorProc() {
225 if (supports_simd(SK_CPU_SSE_LEVEL_SSE2)) { 240 if (supports_simd(SK_CPU_SSE_LEVEL_SSE2)) {
226 return Color32_SSE2; 241 return Color32_SSE2;
227 } else { 242 } else {
228 return NULL; 243 return NULL;
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 } else { 379 } else {
365 return SkPlatformXfermodeFactory_impl(rec, mode); 380 return SkPlatformXfermodeFactory_impl(rec, mode);
366 } 381 }
367 } 382 }
368 383
369 SkXfermodeProc SkPlatformXfermodeProcFactory(SkXfermode::Mode mode); 384 SkXfermodeProc SkPlatformXfermodeProcFactory(SkXfermode::Mode mode);
370 385
371 SkXfermodeProc SkPlatformXfermodeProcFactory(SkXfermode::Mode mode) { 386 SkXfermodeProc SkPlatformXfermodeProcFactory(SkXfermode::Mode mode) {
372 return NULL; 387 return NULL;
373 } 388 }
OLDNEW
« src/opts/SkBlitRow_opts_SSE4_x64_asm.S ('K') | « src/opts/SkBlitRow_opts_SSE4_x64_asm.S ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698