OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright 2012 The Android Open Source Project | 2 * Copyright 2012 The Android Open Source Project |
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 <tmmintrin.h> // SSSE3 | |
9 #include "SkBitmapProcState_opts_SSSE3.h" | 8 #include "SkBitmapProcState_opts_SSSE3.h" |
10 #include "SkPaint.h" | 9 #include "SkPaint.h" |
11 #include "SkUtils.h" | 10 #include "SkUtils.h" |
12 | 11 |
12 #if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSSE3 | |
13 #include <tmmintrin.h> // SSSE3 | |
14 | |
13 // adding anonymous namespace seemed to force gcc to inline directly the | 15 // adding anonymous namespace seemed to force gcc to inline directly the |
14 // instantiation, instead of creating the functions | 16 // instantiation, instead of creating the functions |
15 // S32_generic_D32_filter_DX_SSSE3<true> and | 17 // S32_generic_D32_filter_DX_SSSE3<true> and |
16 // S32_generic_D32_filter_DX_SSSE3<false> which were then called by the | 18 // S32_generic_D32_filter_DX_SSSE3<false> which were then called by the |
17 // external functions. | 19 // external functions. |
18 namespace { | 20 namespace { |
19 // In this file, variations for alpha and non alpha versions are implemented | 21 // In this file, variations for alpha and non alpha versions are implemented |
20 // with a template, as it makes the code more compact and a bit easier to | 22 // with a template, as it makes the code more compact and a bit easier to |
21 // maintain, while making the compiler generate the same exact code as with | 23 // maintain, while making the compiler generate the same exact code as with |
22 // two functions that only differ by a few lines. | 24 // two functions that only differ by a few lines. |
(...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
715 const uint32_t* xy, | 717 const uint32_t* xy, |
716 int count, uint32_t* colors) { | 718 int count, uint32_t* colors) { |
717 S32_generic_D32_filter_DXDY_SSSE3<false>(s, xy, count, colors); | 719 S32_generic_D32_filter_DXDY_SSSE3<false>(s, xy, count, colors); |
718 } | 720 } |
719 | 721 |
720 void S32_alpha_D32_filter_DXDY_SSSE3(const SkBitmapProcState& s, | 722 void S32_alpha_D32_filter_DXDY_SSSE3(const SkBitmapProcState& s, |
721 const uint32_t* xy, | 723 const uint32_t* xy, |
722 int count, uint32_t* colors) { | 724 int count, uint32_t* colors) { |
723 S32_generic_D32_filter_DXDY_SSSE3<true>(s, xy, count, colors); | 725 S32_generic_D32_filter_DXDY_SSSE3<true>(s, xy, count, colors); |
724 } | 726 } |
727 #else | |
mtklein
2014/02/21 19:24:31
Can you tack on // (SK_CPU_SSE_LEVEL < SK_CPU_SSE_
djsollen
2014/02/21 19:38:22
Done.
| |
728 | |
729 void S32_opaque_D32_filter_DX_SSSE3(const SkBitmapProcState& s, | |
730 const uint32_t* xy, | |
731 int count, uint32_t* colors) { | |
732 sk_throw(); | |
733 } | |
734 | |
735 void S32_alpha_D32_filter_DX_SSSE3(const SkBitmapProcState& s, | |
736 const uint32_t* xy, | |
737 int count, uint32_t* colors) { | |
738 sk_throw(); | |
mtklein
2014/02/21 19:24:31
Some funky indents.
djsollen
2014/02/21 19:38:22
Done.
| |
739 } | |
740 | |
741 void S32_opaque_D32_filter_DXDY_SSSE3(const SkBitmapProcState& s, | |
742 const uint32_t* xy, | |
743 int count, uint32_t* colors) { | |
744 sk_throw(); | |
745 } | |
746 | |
747 void S32_alpha_D32_filter_DXDY_SSSE3(const SkBitmapProcState& s, | |
748 const uint32_t* xy, | |
749 int count, uint32_t* colors) { | |
750 sk_throw(); | |
751 } | |
752 | |
753 #endif | |
OLD | NEW |