diff options
author | 2014-06-05 07:50:54 -0700 | |
---|---|---|
committer | 2014-06-05 07:50:54 -0700 | |
commit | e2527b147679b0c43019fae7d59cc3777d2d097e (patch) | |
tree | d08603391de4fdf674b249223cb16301affd46ef /src/opts/SkBlitRow_opts_SSE4.h | |
parent | 58edea89627d347010cadc26ce3c092a9265a8ee (diff) |
Add SSE4 optimization of S32A_Opaque_Blitrow
Adds optimization of Skia S32A_Opaque_Blitrow blitter using SSE4.2 SIMD
instruction set. Special case for when alpha is zero or opaque.
Performance increase of 10%-400% compared to the existing SSE2
optimization (measured on Silvermont architecture).
Noticeable in ~25 different skia bench subtests, especially in
bitmap_8888_*, repeatTile_*, and morph_*.
bitmap_8888_A - 100% faster
bitmap_8888_A_source_transparent - 250% faster
bitmap_8888_A_source_opaque - 25% faster
bitmap_8888_A_scale_bicubic - 75% faster
Signed-off-by: Henrik Smiding <henrik.smiding@intel.com>
R=reed@google.com, mtklein@google.com, tomhudson@google.com, djsollen@google.com, joakim.landberg@intel.com
Author: henrik.smiding@intel.com
Review URL: https://codereview.chromium.org/289473009
Diffstat (limited to 'src/opts/SkBlitRow_opts_SSE4.h')
-rw-r--r-- | src/opts/SkBlitRow_opts_SSE4.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/opts/SkBlitRow_opts_SSE4.h b/src/opts/SkBlitRow_opts_SSE4.h new file mode 100644 index 0000000000..229e7072de --- /dev/null +++ b/src/opts/SkBlitRow_opts_SSE4.h @@ -0,0 +1,20 @@ +/* + * Copyright 2013 The Android Open Source Project + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#ifndef SkBlitRow_opts_SSE4_DEFINED +#define SkBlitRow_opts_SSE4_DEFINED + +#include "SkBlitRow.h" + +#if !defined(_MSC_VER) +extern "C" void S32A_Opaque_BlitRow32_SSE4_asm(SkPMColor* SK_RESTRICT dst, + const SkPMColor* SK_RESTRICT src, + int count, U8CPU alpha); +#endif + +#endif + |