| 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 "SkLazyPtr.h" | 16 #include "SkLazyPtr.h" |
| 17 #include "SkMorphology_opts.h" | |
| 18 #include "SkMorphology_opts_SSE2.h" | |
| 19 #include "SkRTConf.h" | 17 #include "SkRTConf.h" |
| 20 | 18 |
| 21 #if defined(_MSC_VER) && defined(_WIN64) | 19 #if defined(_MSC_VER) && defined(_WIN64) |
| 22 #include <intrin.h> | 20 #include <intrin.h> |
| 23 #endif | 21 #endif |
| 24 | 22 |
| 25 /* This file must *not* be compiled with -msse or any other optional SIMD | 23 /* This file must *not* be compiled with -msse or any other optional SIMD |
| 26 extension, otherwise gcc may generate SIMD instructions even for scalar ops | 24 extension, otherwise gcc may generate SIMD instructions even for scalar ops |
| 27 (and thus give an invalid instruction on Pentium3 on the code below). | 25 (and thus give an invalid instruction on Pentium3 on the code below). |
| 28 For example, only files named *_SSE2.cpp in this directory should be | 26 For example, only files named *_SSE2.cpp in this directory should be |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 } | 285 } |
| 288 } else { | 286 } else { |
| 289 return NULL; | 287 return NULL; |
| 290 } | 288 } |
| 291 | 289 |
| 292 } | 290 } |
| 293 | 291 |
| 294 SkBlitMask::RowProc SkBlitMask::PlatformRowProcs(SkColorType, SkMask::Format, Ro
wFlags) { | 292 SkBlitMask::RowProc SkBlitMask::PlatformRowProcs(SkColorType, SkMask::Format, Ro
wFlags) { |
| 295 return NULL; | 293 return NULL; |
| 296 } | 294 } |
| 297 | |
| 298 //////////////////////////////////////////////////////////////////////////////// | |
| 299 | |
| 300 SkMorphologyImageFilter::Proc SkMorphologyGetPlatformProc(SkMorphologyProcType t
ype) { | |
| 301 if (!supports_simd(SK_CPU_SSE_LEVEL_SSE2)) { | |
| 302 return NULL; | |
| 303 } | |
| 304 switch (type) { | |
| 305 case kDilateX_SkMorphologyProcType: | |
| 306 return SkDilateX_SSE2; | |
| 307 case kDilateY_SkMorphologyProcType: | |
| 308 return SkDilateY_SSE2; | |
| 309 case kErodeX_SkMorphologyProcType: | |
| 310 return SkErodeX_SSE2; | |
| 311 case kErodeY_SkMorphologyProcType: | |
| 312 return SkErodeY_SSE2; | |
| 313 default: | |
| 314 return NULL; | |
| 315 } | |
| 316 } | |
| OLD | NEW |