Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Side by Side Diff: src/opts/SkXfermode_opts_SSE2.cpp

Issue 769953002: Remove SK_SUPPORT_LEGACY_DEEPFLATTENING. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/opts/SkXfermode_opts_SSE2.h ('k') | src/opts/SkXfermode_opts_arm_neon.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 623 matching lines...) Expand 10 before | Expand all | Expand 10 after
634 SkGetPackedB32_SSE2(dst), sa, da); 634 SkGetPackedB32_SSE2(dst), sa, da);
635 return SkPackARGB32_SSE2(a, r, g, b); 635 return SkPackARGB32_SSE2(a, r, g, b);
636 } 636 }
637 637
638 //////////////////////////////////////////////////////////////////////////////// 638 ////////////////////////////////////////////////////////////////////////////////
639 639
640 typedef __m128i (*SkXfermodeProcSIMD)(const __m128i& src, const __m128i& dst); 640 typedef __m128i (*SkXfermodeProcSIMD)(const __m128i& src, const __m128i& dst);
641 641
642 extern SkXfermodeProcSIMD gSSE2XfermodeProcs[]; 642 extern SkXfermodeProcSIMD gSSE2XfermodeProcs[];
643 643
644 #ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING
645 SkSSE2ProcCoeffXfermode::SkSSE2ProcCoeffXfermode(SkReadBuffer& buffer) : INHERIT ED(buffer) {
646 fProcSIMD = reinterpret_cast<void*>(gSSE2XfermodeProcs[this->getMode()]);
647 buffer.validate(fProcSIMD != NULL);
648 }
649 #endif
650
651 void SkSSE2ProcCoeffXfermode::xfer32(SkPMColor dst[], const SkPMColor src[], 644 void SkSSE2ProcCoeffXfermode::xfer32(SkPMColor dst[], const SkPMColor src[],
652 int count, const SkAlpha aa[]) const { 645 int count, const SkAlpha aa[]) const {
653 SkASSERT(dst && src && count >= 0); 646 SkASSERT(dst && src && count >= 0);
654 647
655 SkXfermodeProc proc = this->getProc(); 648 SkXfermodeProc proc = this->getProc();
656 SkXfermodeProcSIMD procSIMD = reinterpret_cast<SkXfermodeProcSIMD>(fProcSIMD ); 649 SkXfermodeProcSIMD procSIMD = reinterpret_cast<SkXfermodeProcSIMD>(fProcSIMD );
657 SkASSERT(procSIMD != NULL); 650 SkASSERT(procSIMD != NULL);
658 651
659 if (NULL == aa) { 652 if (NULL == aa) {
660 if (count >= 4) { 653 if (count >= 4) {
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
811 804
812 SkProcCoeffXfermode* SkPlatformXfermodeFactory_impl_SSE2(const ProcCoeff& rec, 805 SkProcCoeffXfermode* SkPlatformXfermodeFactory_impl_SSE2(const ProcCoeff& rec,
813 SkXfermode::Mode mode) { 806 SkXfermode::Mode mode) {
814 void* procSIMD = reinterpret_cast<void*>(gSSE2XfermodeProcs[mode]); 807 void* procSIMD = reinterpret_cast<void*>(gSSE2XfermodeProcs[mode]);
815 808
816 if (procSIMD != NULL) { 809 if (procSIMD != NULL) {
817 return SkNEW_ARGS(SkSSE2ProcCoeffXfermode, (rec, mode, procSIMD)); 810 return SkNEW_ARGS(SkSSE2ProcCoeffXfermode, (rec, mode, procSIMD));
818 } 811 }
819 return NULL; 812 return NULL;
820 } 813 }
OLDNEW
« no previous file with comments | « src/opts/SkXfermode_opts_SSE2.h ('k') | src/opts/SkXfermode_opts_arm_neon.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698