OLD | NEW |
1 | |
2 /* | 1 /* |
3 * Copyright 2009 The Android Open Source Project | 2 * Copyright 2009 The Android Open Source Project |
4 * | 3 * |
5 * 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 |
6 * found in the LICENSE file. | 5 * found in the LICENSE file. |
7 */ | 6 */ |
8 | 7 |
9 | |
10 #include <emmintrin.h> | 8 #include <emmintrin.h> |
11 #include "SkBitmapProcState_opts_SSE2.h" | 9 #include "SkBitmapProcState_opts_SSE2.h" |
12 #include "SkColorPriv.h" | 10 #include "SkColorPriv.h" |
13 #include "SkPaint.h" | 11 #include "SkPaint.h" |
14 #include "SkUtils.h" | 12 #include "SkUtils.h" |
15 | 13 |
16 void S32_opaque_D32_filter_DX_SSE2(const SkBitmapProcState& s, | 14 void S32_opaque_D32_filter_DX_SSE2(const SkBitmapProcState& s, |
17 const uint32_t* xy, | 15 const uint32_t* xy, |
18 int count, uint32_t* colors) { | 16 int count, uint32_t* colors) { |
19 SkASSERT(count > 0 && colors != NULL); | 17 SkASSERT(count > 0 && colors != NULL); |
(...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
741 | 739 |
742 // Pack lower 4 16 bit values of sum into lower 4 bytes. | 740 // Pack lower 4 16 bit values of sum into lower 4 bytes. |
743 sum = _mm_packus_epi16(sum, zero); | 741 sum = _mm_packus_epi16(sum, zero); |
744 | 742 |
745 // Extract low int and store. | 743 // Extract low int and store. |
746 dstColor = _mm_cvtsi128_si32(sum); | 744 dstColor = _mm_cvtsi128_si32(sum); |
747 | 745 |
748 *colors++ = SkPixel32ToPixel16(dstColor); | 746 *colors++ = SkPixel32ToPixel16(dstColor); |
749 } while (--count > 0); | 747 } while (--count > 0); |
750 } | 748 } |
OLD | NEW |