Index: src/core/SkBlitter_RGB16.cpp |
diff --git a/src/core/SkBlitter_RGB16.cpp b/src/core/SkBlitter_RGB16.cpp |
index 8caf90831231fdcc61cd6c166e193a9eab1ee281..e3b418edc68b5d10de0a061077ba629bf2d30b92 100644 |
--- a/src/core/SkBlitter_RGB16.cpp |
+++ b/src/core/SkBlitter_RGB16.cpp |
@@ -27,6 +27,10 @@ extern void SkRGB16BlitterBlitV_neon(uint16_t* device, |
size_t deviceRB, |
unsigned scale, |
uint32_t src32); |
+extern void SkRGB16BlitterBlitH_neon(uint16_t* device, |
+ int height, |
+ unsigned scale, |
+ uint32_t src32); |
#else |
// if we don't have neon, then our black blitter is worth the extra code |
#define USE_BLACK_BLITTER |
@@ -338,10 +342,14 @@ void SkRGB16_Opaque_Blitter::blitAntiH(int x, int y, |
uint32_t src32 = srcExpanded * scale5; |
scale5 = 32 - scale5; // now we can use it on the device |
int n = count; |
+#if SK_ARM_NEON_IS_ALWAYS && defined(SK_CPU_LENDIAN) |
+ SkRGB16BlitterBlitH_neon(device, n, scale5, src32); |
+#else |
do { |
uint32_t dst32 = SkExpand_rgb_16(*device) * scale5; |
*device++ = SkCompact_rgb_16((src32 + dst32) >> 5); |
} while (--n != 0); |
+#endif |
goto DONE; |
} |
} |
@@ -601,10 +609,14 @@ void SkRGB16_Blitter::blitAntiH(int x, int y, |
unsigned scale5 = SkAlpha255To256(aa) * scale >> (8 + 3); |
uint32_t src32 = srcExpanded * scale5; |
scale5 = 32 - scale5; |
+#if SK_ARM_NEON_IS_ALWAYS && defined(SK_CPU_LENDIAN) |
mtklein
2015/07/29 14:07:11
This is fine, but we basically make no attempt to
yang.zhang
2015/07/30 05:35:34
I have verified that this NEON function can be com
mtklein
2015/07/30 12:29:05
(Sorry, I meant "whether Skia'd even compile for b
|
+ SkRGB16BlitterBlitH_neon(device, count, scale5, src32); |
+#else |
do { |
uint32_t dst32 = SkExpand_rgb_16(*device) * scale5; |
*device++ = SkCompact_rgb_16((src32 + dst32) >> 5); |
} while (--count != 0); |
+#endif |
continue; |
} |
device += count; |