From 6818083c672be1ac756ad46e682b33126e3bfd5f Mon Sep 17 00:00:00 2001 From: Lee Hwangjae Date: Fri, 17 Aug 2012 12:20:24 +0900 Subject: Support NEON anti-aliasing blit function in SKIA original function has calculation are called repetitively, and Processed individual pixels only. So Function call overhead was reduced. And In contrast to the serial data processing in the existing code, the Neon code processes 8 or 4 pixels in parallel. In contrast to the serial data processing in the existing code, the Neon code processes 8 or 4 pixels in parallel Change-Id: Ib54aeb6bacfd4ed6d257324e8146b211f90b68e9 Signed-off-by: Lee Hwangjae --- src/core/SkBlitter_RGB16.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/core/SkBlitter_RGB16.cpp') diff --git a/src/core/SkBlitter_RGB16.cpp b/src/core/SkBlitter_RGB16.cpp index 8a4d454..c3fb3cf 100644 --- a/src/core/SkBlitter_RGB16.cpp +++ b/src/core/SkBlitter_RGB16.cpp @@ -579,13 +579,22 @@ void SkRGB16_Blitter::blitH(int x, int y, int width) { blend32_16_row(fSrcColor32, device, width); } +#ifdef NEON_BLITANTIH +extern "C" void blitAntiH_NEON(const SkAlpha* SK_RESTRICT antialias, + uint16_t * SK_RESTRICT device, + const int16_t* SK_RESTRICT runs, + uint32_t srcExpanded, unsigned scale); +#endif + void SkRGB16_Blitter::blitAntiH(int x, int y, const SkAlpha* SK_RESTRICT antialias, const int16_t* SK_RESTRICT runs) { uint16_t* SK_RESTRICT device = fDevice.getAddr16(x, y); uint32_t srcExpanded = fExpandedRaw16; unsigned scale = fScale; - +#ifdef NEON_BLITANTIH + blitAntiH_NEON(antialias, device, runs, srcExpanded, scale); +#else // TODO: respect fDoDither for (;;) { int count = runs[0]; @@ -609,6 +618,7 @@ void SkRGB16_Blitter::blitAntiH(int x, int y, } device += count; } +#endif } static inline void blend_8_pixels(U8CPU bw, uint16_t dst[], unsigned dst_scale, -- cgit v1.1