Chromium Code Reviews| 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 "SkBitmapProcState_opts_SSE2.h" | 8 #include "SkBitmapProcState_opts_SSE2.h" |
| 9 #include "SkBitmapProcState_opts_SSSE3.h" | 9 #include "SkBitmapProcState_opts_SSSE3.h" |
| 10 #include "SkBitmapFilter_opts_SSE2.h" | 10 #include "SkBitmapFilter_opts_SSE2.h" |
| 11 #include "SkBlitMask.h" | 11 #include "SkBlitMask.h" |
| 12 #include "SkBlitRow.h" | 12 #include "SkBlitRow.h" |
| 13 #include "SkBlitRect_opts_SSE2.h" | 13 #include "SkBlitRect_opts_SSE2.h" |
| 14 #include "SkBlitRow_opts_SSE2.h" | 14 #include "SkBlitRow_opts_SSE2.h" |
| 15 #include "SkBlurImage_opts_SSE2.h" | |
| 15 #include "SkUtils_opts_SSE2.h" | 16 #include "SkUtils_opts_SSE2.h" |
| 16 #include "SkUtils.h" | 17 #include "SkUtils.h" |
| 17 #include "SkMorphology_opts.h" | 18 #include "SkMorphology_opts.h" |
| 18 #include "SkMorphology_opts_SSE2.h" | 19 #include "SkMorphology_opts_SSE2.h" |
| 19 | 20 |
| 20 #include "SkRTConf.h" | 21 #include "SkRTConf.h" |
| 21 | 22 |
| 22 #if defined(_MSC_VER) && defined(_WIN64) | 23 #if defined(_MSC_VER) && defined(_WIN64) |
| 23 #include <intrin.h> | 24 #include <intrin.h> |
| 24 #endif | 25 #endif |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 261 return SkDilateY_SSE2; | 262 return SkDilateY_SSE2; |
| 262 case kErodeX_SkMorphologyProcType: | 263 case kErodeX_SkMorphologyProcType: |
| 263 return SkErodeX_SSE2; | 264 return SkErodeX_SSE2; |
| 264 case kErodeY_SkMorphologyProcType: | 265 case kErodeY_SkMorphologyProcType: |
| 265 return SkErodeY_SSE2; | 266 return SkErodeY_SSE2; |
| 266 default: | 267 default: |
| 267 return NULL; | 268 return NULL; |
| 268 } | 269 } |
| 269 } | 270 } |
| 270 | 271 |
| 272 SkBoxBlurProc SkBoxBlurGetPlatformProc(SkBlurDirection srcDirection, SkBlurDirec tion dstDirection) { | |
| 273 #ifdef SK_DISABLE_BLUR_DIVISION_OPTIMIZATION | |
| 274 return NULL; | |
|
mtklein
2013/11/08 02:11:03
Line counter in me cries out for:
#ifndef SK_DISA
| |
| 275 #else | |
| 276 if (!cachedHasSSE2()) { | |
| 277 return NULL; | |
| 278 } | |
| 279 if (srcDirection == kX_BlurDirection) { | |
| 280 if (dstDirection == kX_BlurDirection) { | |
| 281 return SkBoxBlur_SSE2<kX_BlurDirection, kX_BlurDirection>; | |
| 282 } else if (dstDirection == kY_BlurDirection) { | |
| 283 return SkBoxBlur_SSE2<kX_BlurDirection, kY_BlurDirection>; | |
| 284 } | |
| 285 } else { | |
| 286 if (dstDirection == kX_BlurDirection) { | |
| 287 return SkBoxBlur_SSE2<kY_BlurDirection, kX_BlurDirection>; | |
| 288 } else if (dstDirection == kY_BlurDirection) { | |
| 289 return SkBoxBlur_SSE2<kY_BlurDirection, kY_BlurDirection>; | |
| 290 } | |
| 291 } | |
| 292 return NULL; | |
| 293 #endif | |
| 294 } | |
| 295 | |
| 271 SkBlitRow::ColorRectProc PlatformColorRectProcFactory(); // suppress warning | 296 SkBlitRow::ColorRectProc PlatformColorRectProcFactory(); // suppress warning |
| 272 | 297 |
| 273 SkBlitRow::ColorRectProc PlatformColorRectProcFactory() { | 298 SkBlitRow::ColorRectProc PlatformColorRectProcFactory() { |
| 274 if (cachedHasSSE2()) { | 299 if (cachedHasSSE2()) { |
| 275 return ColorRect32_SSE2; | 300 return ColorRect32_SSE2; |
| 276 } else { | 301 } else { |
| 277 return NULL; | 302 return NULL; |
| 278 } | 303 } |
| 279 } | 304 } |
| OLD | NEW |