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

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

Issue 1273203002: The compiler can generate smulbb perfectly well nowadays. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: parens Created 5 years, 4 months 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/SkBlitRow_opts_arm_neon.cpp ('k') | no next file » | 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 2014 The Android Open Source Project 2 * Copyright 2014 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 "SkBlitRow.h" 8 #include "SkBlitRow.h"
9 #include "SkBlitMask.h" 9 #include "SkBlitMask.h"
10 #include "SkColorPriv.h" 10 #include "SkColorPriv.h"
(...skipping 735 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 : [alpha]"r"(alpha) 746 : [alpha]"r"(alpha)
747 : "memory", "hi", "lo" 747 : "memory", "hi", "lo"
748 ); 748 );
749 749
750 if (count == 1) { 750 if (count == 1) {
751 SkPMColor sc = *src++; 751 SkPMColor sc = *src++;
752 SkPMColorAssert(sc); 752 SkPMColorAssert(sc);
753 if (sc) { 753 if (sc) {
754 uint16_t dc = *dst; 754 uint16_t dc = *dst;
755 unsigned dst_scale = 255 - SkMulDiv255Round(SkGetPackedA32(sc), alph a); 755 unsigned dst_scale = 255 - SkMulDiv255Round(SkGetPackedA32(sc), alph a);
756 unsigned dr = SkMulS16(SkPacked32ToR16(sc), alpha) + 756 unsigned dr = (SkPacked32ToR16(sc) * alpha) + (SkGetPackedR16(dc) * dst_scale);
757 SkMulS16(SkGetPackedR16(dc), dst_scale); 757 unsigned dg = (SkPacked32ToG16(sc) * alpha) + (SkGetPackedG16(dc) * dst_scale);
758 unsigned dg = SkMulS16(SkPacked32ToG16(sc), alpha) + 758 unsigned db = (SkPacked32ToB16(sc) * alpha) + (SkGetPackedB16(dc) * dst_scale);
759 SkMulS16(SkGetPackedG16(dc), dst_scale);
760 unsigned db = SkMulS16(SkPacked32ToB16(sc), alpha) +
761 SkMulS16(SkGetPackedB16(dc), dst_scale);
762 *dst = SkPackRGB16(SkDiv255Round(dr), SkDiv255Round(dg), SkDiv255Rou nd(db)); 759 *dst = SkPackRGB16(SkDiv255Round(dr), SkDiv255Round(dg), SkDiv255Rou nd(db));
763 } 760 }
764 dst += 1; 761 dst += 1;
765 } 762 }
766 } 763 }
767 764
768 static void S32_Blend_BlitRow32_mips_dsp(SkPMColor* SK_RESTRICT dst, 765 static void S32_Blend_BlitRow32_mips_dsp(SkPMColor* SK_RESTRICT dst,
769 const SkPMColor* SK_RESTRICT src, 766 const SkPMColor* SK_RESTRICT src,
770 int count, U8CPU alpha) { 767 int count, U8CPU alpha) {
771 register int32_t t0, t1, t2, t3, t4, t5, t6, t7; 768 register int32_t t0, t1, t2, t3, t4, t5, t6, t7;
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
946 return platform_565_procs_mips_dsp[flags]; 943 return platform_565_procs_mips_dsp[flags];
947 } 944 }
948 945
949 SkBlitRow::ColorProc16 SkBlitRow::PlatformColorFactory565(unsigned flags) { 946 SkBlitRow::ColorProc16 SkBlitRow::PlatformColorFactory565(unsigned flags) {
950 return NULL; 947 return NULL;
951 } 948 }
952 949
953 SkBlitRow::Proc32 SkBlitRow::PlatformProcs32(unsigned flags) { 950 SkBlitRow::Proc32 SkBlitRow::PlatformProcs32(unsigned flags) {
954 return platform_32_procs_mips_dsp[flags]; 951 return platform_32_procs_mips_dsp[flags];
955 } 952 }
OLDNEW
« no previous file with comments | « src/opts/SkBlitRow_opts_arm_neon.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698