| 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" | |
| 11 #include "SkXfermode_proccoeff.h" | 10 #include "SkXfermode_proccoeff.h" |
| 12 #include "Sk4pxXfermode.h" | 11 #include "Sk4pxXfermode.h" |
| 13 #include "SkColorPriv.h" | 12 #include "SkColorPriv.h" |
| 14 #include "SkLazyPtr.h" | 13 #include "SkLazyPtr.h" |
| 15 #include "SkMathPriv.h" | 14 #include "SkMathPriv.h" |
| 16 #include "SkPMFloat.h" | 15 #include "SkPMFloat.h" |
| 17 #include "SkReadBuffer.h" | 16 #include "SkReadBuffer.h" |
| 18 #include "SkString.h" | 17 #include "SkString.h" |
| 19 #include "SkUtilsArm.h" | |
| 20 #include "SkWriteBuffer.h" | 18 #include "SkWriteBuffer.h" |
| 21 | 19 |
| 22 #if !SK_ARM_NEON_IS_NONE | |
| 23 #include "SkXfermode_opts_arm_neon.h" | |
| 24 #endif | |
| 25 | |
| 26 #define SkAlphaMulAlpha(a, b) SkMulDiv255Round(a, b) | 20 #define SkAlphaMulAlpha(a, b) SkMulDiv255Round(a, b) |
| 27 | 21 |
| 28 static inline unsigned saturated_add(unsigned a, unsigned b) { | 22 static inline unsigned saturated_add(unsigned a, unsigned b) { |
| 29 SkASSERT(a <= 255); | 23 SkASSERT(a <= 255); |
| 30 SkASSERT(b <= 255); | 24 SkASSERT(b <= 255); |
| 31 unsigned sum = a + b; | 25 unsigned sum = a + b; |
| 32 if (sum > 255) { | 26 if (sum > 255) { |
| 33 sum = 255; | 27 sum = 255; |
| 34 } | 28 } |
| 35 return sum; | 29 return sum; |
| (...skipping 1497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1533 } else { | 1527 } else { |
| 1534 proc16 = rec.fProc16_General; | 1528 proc16 = rec.fProc16_General; |
| 1535 } | 1529 } |
| 1536 } | 1530 } |
| 1537 return proc16; | 1531 return proc16; |
| 1538 } | 1532 } |
| 1539 | 1533 |
| 1540 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkXfermode) | 1534 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkXfermode) |
| 1541 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkProcCoeffXfermode) | 1535 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkProcCoeffXfermode) |
| 1542 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END | 1536 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END |
| OLD | NEW |