Go to file
Joel Liang 7adde145d3 Optimize SkBlend by using NEON intrinsics
Use NEON intrinsics to check the alpha channel of the pixels.

In some case, it's about 14 times faster than the original implementation.

$ ./bin/droid out/arm64_release/nanobench  --samples 300 --nompd --match LinearSrcOver -v > neon_opt.log
$ ./bin/compare neon_opt.log clean.log
     LinearSrcOver_yellow_rose.pngVSkOptsDefault         1.8ms -> 24.9ms        13.8x
       LinearSrcOver_iconstrip.pngVSkOptsDefault        5.71ms -> 69.8ms        12.2x
           LinearSrcOver_plane.pngVSkOptsDefault        1.45ms ->   11ms        7.62x
        LinearSrcOver_baby_tux.pngVSkOptsDefault        1.88ms -> 9.96ms        5.29x
    LinearSrcOver_mandrill_512.pngVSkOptsDefault        1.41ms -> 4.62ms        3.29x
     LinearSrcOver_yellow_rose.pngVSkOptsTrivial        24.9ms -> 24.9ms        1x
 LinearSrcOver_yellow_rose.pngVSkOptsNonSimdCore        2.17ms -> 2.18ms        1x
           LinearSrcOver_plane.pngVSkOptsTrivial        11.1ms -> 11.1ms        1x
       LinearSrcOver_plane.pngVSkOptsNonSimdCore         1.5ms ->  1.5ms        1x
LinearSrcOver_mandrill_512.pngVSkOptsNonSimdCore        2.39ms -> 2.39ms        1x
   LinearSrcOver_iconstrip.pngVSkOptsNonSimdCore        6.43ms -> 6.43ms        1x
     LinearSrcOver_baby_tux.pngVSkOptsBruteForce        22.3ms -> 22.3ms        1x
  LinearSrcOver_yellow_rose.pngVSkOptsBruteForce        45.5ms -> 45.5ms        1x
    LinearSrcOver_baby_tux.pngVSkOptsNonSimdCore        2.02ms -> 2.02ms        1x
       LinearSrcOver_iconstrip.pngVSkOptsTrivial        69.7ms -> 69.7ms        1x
        LinearSrcOver_baby_tux.pngVSkOptsTrivial        9.96ms -> 9.95ms        1x
 LinearSrcOver_mandrill_512.pngVSkOptsBruteForce        99.3ms -> 99.2ms        1x

BUG=skia:

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD

Change-Id: Ia576365578d65b771440da65fdf41f090ccf0541
Reviewed-on: https://skia-review.googlesource.com/6860
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-01-13 13:28:16 +00:00
animations first cut at a checkbox 2009-10-21 19:41:10 +00:00
bench Attempt 3: SkRasterPipelineBlitter: support A8 2017-01-13 13:25:28 +00:00
bin drop depot_tools dependency in bin/fetch-gn 2017-01-12 19:54:50 +00:00
debugger Get Debugger app compiling again 2017-01-06 16:18:27 +00:00
dm Revert "Reland https://skia-review.googlesource.com/c/6091/" 2017-01-13 00:37:20 +00:00
example bench, samples, etc: s/SkAutoTUnref/sk_sp/ 2016-11-07 15:17:32 +00:00
experimental Plumb dst color space in many places, rather than "mode" 2016-12-09 20:31:23 +00:00
fuzz move SkTRegister.h into tools 2017-01-11 19:53:36 +00:00
gm refFoo variant for getters that naturally have a sk_sp 2017-01-12 16:38:34 +00:00
gn skia_android_serial = "auto" 2017-01-12 16:30:17 +00:00
gyp rm -r {include,src}/animator 2017-01-12 19:52:18 +00:00
include Revert "Reland https://skia-review.googlesource.com/c/6091/" 2017-01-13 00:37:20 +00:00
infra Use RasterPipeline to support full precision on 16-bit RGBA pngs 2017-01-13 00:12:49 +00:00
platform_tools Add support for 64-bit devices when using gdb on Android 2017-01-06 19:57:05 +00:00
resources GIF: Better check for frame dependency 2017-01-03 19:07:41 +00:00
samplecode Revert "Reland https://skia-review.googlesource.com/c/6091/" 2017-01-13 00:37:20 +00:00
site documentation: corrections to PDF docs 2017-01-09 21:03:29 +00:00
src Optimize SkBlend by using NEON intrinsics 2017-01-13 13:28:16 +00:00
tests Fix SkImageFilterCache race 2017-01-12 17:56:13 +00:00
third_party SkTypes.h : move SkAutoMalloc into SkAutoMalloc.h 2017-01-11 18:55:34 +00:00
tools Revert "Reland https://skia-review.googlesource.com/c/6091/" 2017-01-13 00:37:20 +00:00
.clang-format Mark flatennable macros as block beginning/ending in .clang-format 2017-01-09 15:31:36 +00:00
.gitignore drop depot_tools dependency in bin/fetch-gn 2017-01-12 19:54:50 +00:00
.gn Basic standalone GN configs. 2016-07-21 12:25:45 -07:00
AUTHORS Fix typo in GrGLCaps 2016-11-18 23:20:51 +00:00
BUILD.gn Remove defunct include/images directory from GN. 2017-01-12 15:02:14 +00:00
codereview.settings Make uploading to Gerrit the default for Skia 2016-11-09 19:07:56 +00:00
CONTRIBUTING Fix references to https://sites.google.com/site/skiadocs/. 2015-02-03 13:12:54 -02:00
CQ_COMMITTERS Moved committer list to chrome-infra-auth and deleted it from the repo 2015-09-02 13:37:54 -07:00
DEPS Get latest ANGLE as of January 6, 2017 2017-01-11 15:12:40 +00:00
Doxyfile Make the housekeeper upload doxygen to a newer bucket 2016-10-04 13:23:57 -07:00
gyp_skia Make Win runtime DLLs writeable before overwriting 2016-03-18 08:33:38 -07:00
gyp_skia.py Roll gyp deps from 1765 to 1796. 2013-11-21 18:11:14 +00:00
LICENSE BUG=skia:5602 2016-09-02 11:19:34 -07:00
OWNERS add root files from chrome 2013-08-13 19:11:15 +00:00
PRESUBMIT.py Do not use post upload hooks for 'GOLD_TRYBOT_URL' 2016-11-23 18:34:23 +00:00
public.bzl rm -r {include,src}/animator 2017-01-12 19:52:18 +00:00
README Fix references to https://sites.google.com/site/skiadocs/. 2015-02-03 13:12:54 -02:00
README.chromium Update README.chromium. 2015-06-11 13:19:24 -07:00
skia.gyp Fix references to https://sites.google.com/site/skiadocs/. 2015-02-03 13:12:54 -02:00
whitespace.txt Test CL 2016-12-22 01:51:30 +00:00

Skia is a complete 2D graphic library for drawing Text, Geometries, and Images.

See full details, and build instructions, at https://skia.org.