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

Side by Side Diff: src/core/SkXfermode.cpp

Issue 1068783003: re-enable neon opts for some xfermodes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 8 months 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 | « no previous file | no next file » | 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 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "SkXfermode.h" 9 #include "SkXfermode.h"
10 #include "SkXfermode_opts_SSE2.h" 10 #include "SkXfermode_opts_SSE2.h"
11 #include "SkXfermode_proccoeff.h" 11 #include "SkXfermode_proccoeff.h"
12 #include "SkColorPriv.h" 12 #include "SkColorPriv.h"
13 #include "SkLazyPtr.h" 13 #include "SkLazyPtr.h"
14 #include "SkMathPriv.h" 14 #include "SkMathPriv.h"
15 #include "SkPMFloat.h" 15 #include "SkPMFloat.h"
16 #include "SkReadBuffer.h" 16 #include "SkReadBuffer.h"
17 #include "SkString.h" 17 #include "SkString.h"
18 #include "SkUtilsArm.h" 18 #include "SkUtilsArm.h"
19 #include "SkWriteBuffer.h" 19 #include "SkWriteBuffer.h"
20 20
21 //#define SK_SUPPORT_LEGACY_SCALAR_XFERMODES 21 #ifndef SK_SUPPORT_LEGACY_SCALAR_XFERMODES
22 #if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2
23 /*
24 * To be conservative, we only enable the new code path (using SkPMFloat) wh en we
25 * "know" we're faster, which at the moment is only when we have SSE2 or bet ter.
26 */
27 #else
28 #define SK_SUPPORT_LEGACY_SCALAR_XFERMODES
29 #endif
30 #endif
22 31
23 #if !SK_ARM_NEON_IS_NONE 32 #if !SK_ARM_NEON_IS_NONE
24 #include "SkXfermode_opts_arm_neon.h" 33 #include "SkXfermode_opts_arm_neon.h"
25 #endif 34 #endif
26 35
27 #define SkAlphaMulAlpha(a, b) SkMulDiv255Round(a, b) 36 #define SkAlphaMulAlpha(a, b) SkMulDiv255Round(a, b)
28 37
29 static inline unsigned saturated_add(unsigned a, unsigned b) { 38 static inline unsigned saturated_add(unsigned a, unsigned b) {
30 SkASSERT(a <= 255); 39 SkASSERT(a <= 255);
31 SkASSERT(b <= 255); 40 SkASSERT(b <= 255);
(...skipping 1721 matching lines...) Expand 10 before | Expand all | Expand 10 after
1753 } else { 1762 } else {
1754 proc16 = rec.fProc16_General; 1763 proc16 = rec.fProc16_General;
1755 } 1764 }
1756 } 1765 }
1757 return proc16; 1766 return proc16;
1758 } 1767 }
1759 1768
1760 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkXfermode) 1769 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkXfermode)
1761 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkProcCoeffXfermode) 1770 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkProcCoeffXfermode)
1762 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END 1771 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698