OLD | NEW |
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 "SkBitmapScaler.h" | 11 #include "SkBitmapScaler.h" |
12 #include "SkBlitMask.h" | 12 #include "SkBlitMask.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 "SkBlitRow_opts_SSE4.h" |
16 #include "SkBlurImage_opts_SSE2.h" | 16 #include "SkBlurImage_opts_SSE2.h" |
17 #include "SkBlurImage_opts_SSE4.h" | 17 #include "SkBlurImage_opts_SSE4.h" |
18 #include "SkLazyPtr.h" | 18 #include "SkLazyPtr.h" |
19 #include "SkMorphology_opts.h" | 19 #include "SkMorphology_opts.h" |
20 #include "SkMorphology_opts_SSE2.h" | 20 #include "SkMorphology_opts_SSE2.h" |
21 #include "SkRTConf.h" | 21 #include "SkRTConf.h" |
22 #include "SkUtils.h" | 22 #include "SkUtils.h" |
23 #include "SkUtils_opts_SSE2.h" | 23 #include "SkUtils_opts_SSE2.h" |
24 #include "SkXfermode.h" | |
25 #include "SkXfermode_proccoeff.h" | |
26 | 24 |
27 #if defined(_MSC_VER) && defined(_WIN64) | 25 #if defined(_MSC_VER) && defined(_WIN64) |
28 #include <intrin.h> | 26 #include <intrin.h> |
29 #endif | 27 #endif |
30 | 28 |
31 /* This file must *not* be compiled with -msse or any other optional SIMD | 29 /* This file must *not* be compiled with -msse or any other optional SIMD |
32 extension, otherwise gcc may generate SIMD instructions even for scalar ops | 30 extension, otherwise gcc may generate SIMD instructions even for scalar ops |
33 (and thus give an invalid instruction on Pentium3 on the code below). | 31 (and thus give an invalid instruction on Pentium3 on the code below). |
34 For example, only files named *_SSE2.cpp in this directory should be | 32 For example, only files named *_SSE2.cpp in this directory should be |
35 compiled with -msse2 or higher. */ | 33 compiled with -msse2 or higher. */ |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
353 SkBoxBlurProc* boxBlurXY, | 351 SkBoxBlurProc* boxBlurXY, |
354 SkBoxBlurProc* boxBlurYX) { | 352 SkBoxBlurProc* boxBlurYX) { |
355 if (supports_simd(SK_CPU_SSE_LEVEL_SSE41)) { | 353 if (supports_simd(SK_CPU_SSE_LEVEL_SSE41)) { |
356 return SkBoxBlurGetPlatformProcs_SSE4(boxBlurX, boxBlurXY, boxBlurYX); | 354 return SkBoxBlurGetPlatformProcs_SSE4(boxBlurX, boxBlurXY, boxBlurYX); |
357 } | 355 } |
358 else if (supports_simd(SK_CPU_SSE_LEVEL_SSE2)) { | 356 else if (supports_simd(SK_CPU_SSE_LEVEL_SSE2)) { |
359 return SkBoxBlurGetPlatformProcs_SSE2(boxBlurX, boxBlurXY, boxBlurYX); | 357 return SkBoxBlurGetPlatformProcs_SSE2(boxBlurX, boxBlurXY, boxBlurYX); |
360 } | 358 } |
361 return false; | 359 return false; |
362 } | 360 } |
363 | |
364 //////////////////////////////////////////////////////////////////////////////// | |
365 | |
366 extern SkProcCoeffXfermode* SkPlatformXfermodeFactory_impl_SSE2(const ProcCoeff&
rec, | |
367 SkXfermode::Mode
mode); | |
368 | |
369 SkProcCoeffXfermode* SkPlatformXfermodeFactory_impl(const ProcCoeff& rec, | |
370 SkXfermode::Mode mode); | |
371 | |
372 SkProcCoeffXfermode* SkPlatformXfermodeFactory_impl(const ProcCoeff& rec, | |
373 SkXfermode::Mode mode) { | |
374 return NULL; | |
375 } | |
376 | |
377 SkProcCoeffXfermode* SkPlatformXfermodeFactory(const ProcCoeff& rec, | |
378 SkXfermode::Mode mode); | |
379 | |
380 SkProcCoeffXfermode* SkPlatformXfermodeFactory(const ProcCoeff& rec, | |
381 SkXfermode::Mode mode) { | |
382 if (supports_simd(SK_CPU_SSE_LEVEL_SSE2)) { | |
383 return SkPlatformXfermodeFactory_impl_SSE2(rec, mode); | |
384 } else { | |
385 return SkPlatformXfermodeFactory_impl(rec, mode); | |
386 } | |
387 } | |
388 | |
389 SkXfermodeProc SkPlatformXfermodeProcFactory(SkXfermode::Mode mode); | |
390 | |
391 SkXfermodeProc SkPlatformXfermodeProcFactory(SkXfermode::Mode mode) { | |
392 return NULL; | |
393 } | |
OLD | NEW |