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

Unified Diff: src/opts/SkColor_opts_neon.h

Issue 23719002: ARM Skia NEON patches - 16/17 - Blitmask (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Rebase, group with LCD16 code and clean Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« src/opts/SkBlitMask_opts_arm.cpp ('K') | « src/opts/SkBlitMask_opts_arm_neon.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/opts/SkColor_opts_neon.h
diff --git a/src/opts/SkColor_opts_neon.h b/src/opts/SkColor_opts_neon.h
index f81239712ab5bba90fb21b6896f7edbb4e658044..9f25b312dbd5a3393f92417a193c9cd009186656 100644
--- a/src/opts/SkColor_opts_neon.h
+++ b/src/opts/SkColor_opts_neon.h
@@ -2,6 +2,7 @@
#define SkColor_opts_neon_DEFINED
#include "SkTypes.h"
+#include "SkColorPriv.h"
djsollen 2013/11/11 17:21:46 why do you need this include?
kevin.petit.not.used.account 2013/11/11 18:10:34 This is here to fix a pre-existing mistake. There
#include <arm_neon.h>
@@ -65,4 +66,17 @@ static inline uint16x8_t SkPixel32ToPixel16_neon8(uint8x8x4_t vsrc) {
return ret;
}
+static inline uint8x8_t SkBlend32_neon8(uint8x8_t src, uint8x8_t dst, uint16x8_t scale) {
mtklein 2013/11/11 17:17:04 Add a brief comment like for 16->32 and 32->16 abo
kevin.petit.not.used.account 2013/11/11 18:10:34 Done.
+ int16x8_t src_wide, dst_wide;
+
+ src_wide = vreinterpretq_s16_u16(vmovl_u8(src));
+ dst_wide = vreinterpretq_s16_u16(vmovl_u8(dst));
+
+ src_wide = (src_wide - dst_wide) * vreinterpretq_s16_u16(scale);
+
+ dst_wide += vshrq_n_s16(src_wide, 5);
+
+ return vmovn_u16(vreinterpretq_u16_s16(dst_wide));
+}
+
#endif /* #ifndef SkColor_opts_neon_DEFINED */
« src/opts/SkBlitMask_opts_arm.cpp ('K') | « src/opts/SkBlitMask_opts_arm_neon.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698