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

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

Issue 768183002: Revert of 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
644 void SkSSE2ProcCoeffXfermode::xfer32(SkPMColor dst[], const SkPMColor src[], 651 void SkSSE2ProcCoeffXfermode::xfer32(SkPMColor dst[], const SkPMColor src[],
645 int count, const SkAlpha aa[]) const { 652 int count, const SkAlpha aa[]) const {
646 SkASSERT(dst && src && count >= 0); 653 SkASSERT(dst && src && count >= 0);
647 654
648 SkXfermodeProc proc = this->getProc(); 655 SkXfermodeProc proc = this->getProc();
649 SkXfermodeProcSIMD procSIMD = reinterpret_cast<SkXfermodeProcSIMD>(fProcSIMD ); 656 SkXfermodeProcSIMD procSIMD = reinterpret_cast<SkXfermodeProcSIMD>(fProcSIMD );
650 SkASSERT(procSIMD != NULL); 657 SkASSERT(procSIMD != NULL);
651 658
652 if (NULL == aa) { 659 if (NULL == aa) {
653 if (count >= 4) { 660 if (count >= 4) {
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
804 811
805 SkProcCoeffXfermode* SkPlatformXfermodeFactory_impl_SSE2(const ProcCoeff& rec, 812 SkProcCoeffXfermode* SkPlatformXfermodeFactory_impl_SSE2(const ProcCoeff& rec,
806 SkXfermode::Mode mode) { 813 SkXfermode::Mode mode) {
807 void* procSIMD = reinterpret_cast<void*>(gSSE2XfermodeProcs[mode]); 814 void* procSIMD = reinterpret_cast<void*>(gSSE2XfermodeProcs[mode]);
808 815
809 if (procSIMD != NULL) { 816 if (procSIMD != NULL) {
810 return SkNEW_ARGS(SkSSE2ProcCoeffXfermode, (rec, mode, procSIMD)); 817 return SkNEW_ARGS(SkSSE2ProcCoeffXfermode, (rec, mode, procSIMD));
811 } 818 }
812 return NULL; 819 return NULL;
813 } 820 }
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