OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 Google Inc. |
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 "SkColorPriv.h" | 8 #include "SkColorPriv.h" |
9 #include "SkColor_opts_SSE2.h" | 9 #include "SkColor_opts_SSE2.h" |
10 #include "SkMathPriv.h" | 10 #include "SkMathPriv.h" |
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
508 | 508 |
509 #ifndef SK_IGNORE_TO_STRING | 509 #ifndef SK_IGNORE_TO_STRING |
510 void SkSSE2ProcCoeffXfermode::toString(SkString* str) const { | 510 void SkSSE2ProcCoeffXfermode::toString(SkString* str) const { |
511 this->INHERITED::toString(str); | 511 this->INHERITED::toString(str); |
512 } | 512 } |
513 #endif | 513 #endif |
514 | 514 |
515 SkProcCoeffXfermode* SkPlatformXfermodeFactory_impl_SSE2(const ProcCoeff& rec, | 515 SkProcCoeffXfermode* SkPlatformXfermodeFactory_impl_SSE2(const ProcCoeff& rec, |
516 SkXfermode::Mode mode)
{ | 516 SkXfermode::Mode mode)
{ |
517 SkXfermodeProcSIMD proc = nullptr; | 517 SkXfermodeProcSIMD proc = nullptr; |
| 518 // TODO(mtklein): implement these Sk4px. |
518 switch (mode) { | 519 switch (mode) { |
519 // TODO(mtklein): Sk4pxXfermode has these now. Clean up. | |
520 case SkProcCoeffXfermode::kOverlay_Mode: proc = overlay_modeproc_S
SE2; break; | 520 case SkProcCoeffXfermode::kOverlay_Mode: proc = overlay_modeproc_S
SE2; break; |
521 case SkProcCoeffXfermode::kDarken_Mode: proc = darken_modeproc_S
SE2; break; | 521 case SkProcCoeffXfermode::kDarken_Mode: proc = darken_modeproc_S
SE2; break; |
522 case SkProcCoeffXfermode::kLighten_Mode: proc = lighten_modeproc_S
SE2; break; | 522 case SkProcCoeffXfermode::kLighten_Mode: proc = lighten_modeproc_S
SE2; break; |
523 case SkProcCoeffXfermode::kHardLight_Mode: proc = hardlight_modeproc_S
SE2; break; | |
524 | |
525 // TODO(mtklein): implement these with SkPMFloat. | |
526 case SkProcCoeffXfermode::kSoftLight_Mode: proc = softlight_modeproc_S
SE2; break; | |
527 case SkProcCoeffXfermode::kColorDodge_Mode: proc = colordodge_modeproc_S
SE2; break; | 523 case SkProcCoeffXfermode::kColorDodge_Mode: proc = colordodge_modeproc_S
SE2; break; |
528 case SkProcCoeffXfermode::kColorBurn_Mode: proc = colorburn_modeproc_S
SE2; break; | 524 case SkProcCoeffXfermode::kColorBurn_Mode: proc = colorburn_modeproc_S
SE2; break; |
| 525 case SkProcCoeffXfermode::kHardLight_Mode: proc = hardlight_modeproc_S
SE2; break; |
| 526 case SkProcCoeffXfermode::kSoftLight_Mode: proc = softlight_modeproc_S
SE2; break; |
529 default: break; | 527 default: break; |
530 } | 528 } |
531 return proc ? SkNEW_ARGS(SkSSE2ProcCoeffXfermode, (rec, mode, (void*)proc))
: nullptr; | 529 return proc ? SkNEW_ARGS(SkSSE2ProcCoeffXfermode, (rec, mode, (void*)proc))
: nullptr; |
532 } | 530 } |
OLD | NEW |