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" | |
17 #include "SkBlurImage_opts_SSE4.h" | |
18 #include "SkLazyPtr.h" | 16 #include "SkLazyPtr.h" |
19 #include "SkMorphology_opts.h" | 17 #include "SkMorphology_opts.h" |
20 #include "SkMorphology_opts_SSE2.h" | 18 #include "SkMorphology_opts_SSE2.h" |
21 #include "SkRTConf.h" | 19 #include "SkRTConf.h" |
22 | 20 |
23 #if defined(_MSC_VER) && defined(_WIN64) | 21 #if defined(_MSC_VER) && defined(_WIN64) |
24 #include <intrin.h> | 22 #include <intrin.h> |
25 #endif | 23 #endif |
26 | 24 |
27 /* This file must *not* be compiled with -msse or any other optional SIMD | 25 /* This file must *not* be compiled with -msse or any other optional SIMD |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
309 case kDilateY_SkMorphologyProcType: | 307 case kDilateY_SkMorphologyProcType: |
310 return SkDilateY_SSE2; | 308 return SkDilateY_SSE2; |
311 case kErodeX_SkMorphologyProcType: | 309 case kErodeX_SkMorphologyProcType: |
312 return SkErodeX_SSE2; | 310 return SkErodeX_SSE2; |
313 case kErodeY_SkMorphologyProcType: | 311 case kErodeY_SkMorphologyProcType: |
314 return SkErodeY_SSE2; | 312 return SkErodeY_SSE2; |
315 default: | 313 default: |
316 return NULL; | 314 return NULL; |
317 } | 315 } |
318 } | 316 } |
319 | |
320 //////////////////////////////////////////////////////////////////////////////// | |
321 | |
322 bool SkBoxBlurGetPlatformProcs(SkBoxBlurProc* boxBlurX, | |
323 SkBoxBlurProc* boxBlurXY, | |
324 SkBoxBlurProc* boxBlurYX) { | |
325 if (supports_simd(SK_CPU_SSE_LEVEL_SSE41)) { | |
326 return SkBoxBlurGetPlatformProcs_SSE4(boxBlurX, boxBlurXY, boxBlurYX); | |
327 } | |
328 else if (supports_simd(SK_CPU_SSE_LEVEL_SSE2)) { | |
329 return SkBoxBlurGetPlatformProcs_SSE2(boxBlurX, boxBlurXY, boxBlurYX); | |
330 } | |
331 return false; | |
332 } | |
OLD | NEW |