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

Side by Side Diff: src/opts/SkBitmapProcState_opts_SSSE3.cpp

Issue 788853002: Add SSSE3 acceleration for S32_D16_filter_DX (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years 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 | « src/opts/SkBitmapProcState_opts_SSSE3.h ('k') | src/opts/opts_check_x86.cpp » ('j') | 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 * 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 "SkBitmapProcState_opts_SSSE3.h" 8 #include "SkBitmapProcState_opts_SSSE3.h"
9 #include "SkColorPriv.h" 9 #include "SkColorPriv.h"
10 #include "SkPaint.h" 10 #include "SkPaint.h"
(...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 int count, uint32_t* colors) { 725 int count, uint32_t* colors) {
726 S32_generic_D32_filter_DXDY_SSSE3<false>(s, xy, count, colors); 726 S32_generic_D32_filter_DXDY_SSSE3<false>(s, xy, count, colors);
727 } 727 }
728 728
729 void S32_alpha_D32_filter_DXDY_SSSE3(const SkBitmapProcState& s, 729 void S32_alpha_D32_filter_DXDY_SSSE3(const SkBitmapProcState& s,
730 const uint32_t* xy, 730 const uint32_t* xy,
731 int count, uint32_t* colors) { 731 int count, uint32_t* colors) {
732 S32_generic_D32_filter_DXDY_SSSE3<true>(s, xy, count, colors); 732 S32_generic_D32_filter_DXDY_SSSE3<true>(s, xy, count, colors);
733 } 733 }
734 734
735 void S32_D16_filter_DX_SSSE3(const SkBitmapProcState& s,
736 const uint32_t* xy,
737 int count, uint16_t* colors) {
738 SkASSERT(254 >= count);
739 SkAutoSTMalloc<254, uint32_t> colors32(count);
740 S32_generic_D32_filter_DX_SSSE3<false>(s, xy, count, colors32);
741 for(int i = 0; i < count; i++) {
742 *colors++ = SkPixel32ToPixel16(colors32[i]);
743 }
744 }
745
735 void S32_D16_filter_DXDY_SSSE3(const SkBitmapProcState& s, 746 void S32_D16_filter_DXDY_SSSE3(const SkBitmapProcState& s,
736 const uint32_t* xy, 747 const uint32_t* xy,
737 int count, uint16_t* colors) { 748 int count, uint16_t* colors) {
738 SkASSERT(64 >= count); 749 SkASSERT(64 >= count);
739 SkAutoSTMalloc<64, uint32_t> colors32(count); 750 SkAutoSTMalloc<64, uint32_t> colors32(count);
740 S32_generic_D32_filter_DXDY_SSSE3<false>(s, xy, count, colors32); 751 S32_generic_D32_filter_DXDY_SSSE3<false>(s, xy, count, colors32);
741 for(int i = 0; i < count; i++) { 752 for(int i = 0; i < count; i++) {
742 *colors++ = SkPixel32ToPixel16(colors32[i]); 753 *colors++ = SkPixel32ToPixel16(colors32[i]);
743 } 754 }
744 } 755 }
(...skipping 17 matching lines...) Expand all
762 int count, uint32_t* colors) { 773 int count, uint32_t* colors) {
763 sk_throw(); 774 sk_throw();
764 } 775 }
765 776
766 void S32_alpha_D32_filter_DXDY_SSSE3(const SkBitmapProcState& s, 777 void S32_alpha_D32_filter_DXDY_SSSE3(const SkBitmapProcState& s,
767 const uint32_t* xy, 778 const uint32_t* xy,
768 int count, uint32_t* colors) { 779 int count, uint32_t* colors) {
769 sk_throw(); 780 sk_throw();
770 } 781 }
771 782
783 void S32_D16_filter_DX_SSSE3(const SkBitmapProcState& s,
784 const uint32_t* xy,
785 int count, uint16_t* colors) {
786 sk_throw();
787 }
788
772 void S32_D16_filter_DXDY_SSSE3(const SkBitmapProcState& s, 789 void S32_D16_filter_DXDY_SSSE3(const SkBitmapProcState& s,
773 const uint32_t* xy, 790 const uint32_t* xy,
774 int count, uint16_t* colors) { 791 int count, uint16_t* colors) {
775 sk_throw(); 792 sk_throw();
776 } 793 }
777 794
778 #endif 795 #endif
OLDNEW
« no previous file with comments | « src/opts/SkBitmapProcState_opts_SSSE3.h ('k') | src/opts/opts_check_x86.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698