| OLD | NEW |
| 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 //#define SK_SUPPORT_LEGACY_SCALAR_XFERMODES |
| 22 | 22 |
| 23 #if !SK_ARM_NEON_IS_NONE | 23 #if !SK_ARM_NEON_IS_NONE |
| 24 #include "SkXfermode_opts_arm_neon.h" | 24 #include "SkXfermode_opts_arm_neon.h" |
| 25 #endif | 25 #endif |
| 26 | 26 |
| 27 #define SkAlphaMulAlpha(a, b) SkMulDiv255Round(a, b) | 27 #define SkAlphaMulAlpha(a, b) SkMulDiv255Round(a, b) |
| 28 | 28 |
| 29 static inline unsigned saturated_add(unsigned a, unsigned b) { | 29 static inline unsigned saturated_add(unsigned a, unsigned b) { |
| 30 SkASSERT(a <= 255); | 30 SkASSERT(a <= 255); |
| 31 SkASSERT(b <= 255); | 31 SkASSERT(b <= 255); |
| (...skipping 1753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1785 } else { | 1785 } else { |
| 1786 proc16 = rec.fProc16_General; | 1786 proc16 = rec.fProc16_General; |
| 1787 } | 1787 } |
| 1788 } | 1788 } |
| 1789 return proc16; | 1789 return proc16; |
| 1790 } | 1790 } |
| 1791 | 1791 |
| 1792 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkXfermode) | 1792 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkXfermode) |
| 1793 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkProcCoeffXfermode) | 1793 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkProcCoeffXfermode) |
| 1794 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END | 1794 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END |
| OLD | NEW |