aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/SkBlitter_RGB16.cpp
diff options
context:
space:
mode:
authorLee Hwangjae <hj-yo.lee@samsung.com>2012-08-17 12:20:24 +0900
committerSteve Kondik <shade@chemlab.org>2012-12-17 19:32:41 -0800
commit6818083c672be1ac756ad46e682b33126e3bfd5f (patch)
tree857676225fec2054033acabfa427a94b015912bf /src/core/SkBlitter_RGB16.cpp
parenta0a3a4d3f7e368311d896eaca0a22732a81d37fb (diff)
downloadexternal_skia-6818083c672be1ac756ad46e682b33126e3bfd5f.zip
external_skia-6818083c672be1ac756ad46e682b33126e3bfd5f.tar.gz
external_skia-6818083c672be1ac756ad46e682b33126e3bfd5f.tar.bz2
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 <hj-yo.lee@samsung.com>
Diffstat (limited to 'src/core/SkBlitter_RGB16.cpp')
-rw-r--r--src/core/SkBlitter_RGB16.cpp12
1 files changed, 11 insertions, 1 deletions
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,