Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Issue 1581933006: Add NEON swap opts and use opts in SkSwizzler (Closed)

Created:
4 years, 11 months ago by msarett
Modified:
4 years, 11 months ago
Reviewers:
scroggo, mtklein
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Add NEON swap opts and use opts in SkSwizzler All RGBA, RGBX, BGRA, BGRX routines in SkSwizzler now use fast options (with the exception of conversions to 565). Swizzle Time for swap_rb 0.94x Nexus 9 0.81x Nexus 6P Unpremul Decode Time for RGBA PNGs*** ZeroInit 0.93x Nexus 9 Regular 0.94x Nexus 9 ZeroInit 0.97x Nexus 6P ZeroInit 0.95x Nexus 6P ***Two Notes: The improvements here are actually due to taking advantage of memcpy() (no need to swap, the bytes are already in the proper order). ZeroInit skips writing zeros to zero initialized memory. This is a memory use opt in Android. BMP decodes should also benefit from these improvements. I am relying on Gold to help test all possible cases. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1581933006 CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Committed: https://skia.googlesource.com/skia/+/03108de163354fa574679ad153b58ce57126b2ba

Patch Set 1 : #

Total comments: 15

Patch Set 2 : Removing unrelated code #

Patch Set 3 : Remove opts for kBGRX #

Total comments: 4

Patch Set 4 : Use SkTSwap #

Unified diffs Side-by-side diffs Delta from patch set Stats (+122 lines, -19 lines) Patch
M src/codec/SkSwizzler.cpp View 1 2 7 chunks +74 lines, -7 lines 0 comments Download
M src/opts/SkSwizzler_opts.h View 1 2 3 3 chunks +48 lines, -12 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 23 (10 generated)
msarett
https://codereview.chromium.org/1581933006/diff/20001/src/codec/SkSwizzler.cpp File src/codec/SkSwizzler.cpp (right): https://codereview.chromium.org/1581933006/diff/20001/src/codec/SkSwizzler.cpp#newcode322 src/codec/SkSwizzler.cpp:322: memcpy(dst, src + offset, width * bpp); This could ...
4 years, 11 months ago (2016-01-14 17:08:25 UTC) #9
scroggo
https://codereview.chromium.org/1581933006/diff/20001/src/codec/SkSwizzler.cpp File src/codec/SkSwizzler.cpp (right): https://codereview.chromium.org/1581933006/diff/20001/src/codec/SkSwizzler.cpp#newcode322 src/codec/SkSwizzler.cpp:322: memcpy(dst, src + offset, width * bpp); On 2016/01/14 ...
4 years, 11 months ago (2016-01-14 17:55:06 UTC) #10
msarett
https://codereview.chromium.org/1581933006/diff/20001/src/codec/SkSwizzler.cpp File src/codec/SkSwizzler.cpp (right): https://codereview.chromium.org/1581933006/diff/20001/src/codec/SkSwizzler.cpp#newcode734 src/codec/SkSwizzler.cpp:734: case kRGB_565_SkColorType: On 2016/01/14 17:55:06, scroggo wrote: > On ...
4 years, 11 months ago (2016-01-14 18:09:09 UTC) #11
scroggo
https://codereview.chromium.org/1581933006/diff/20001/src/codec/SkSwizzler.cpp File src/codec/SkSwizzler.cpp (right): https://codereview.chromium.org/1581933006/diff/20001/src/codec/SkSwizzler.cpp#newcode734 src/codec/SkSwizzler.cpp:734: case kRGB_565_SkColorType: On 2016/01/14 18:09:09, msarett wrote: > On ...
4 years, 11 months ago (2016-01-14 18:14:52 UTC) #12
msarett
https://codereview.chromium.org/1581933006/diff/20001/src/codec/SkSwizzler.cpp File src/codec/SkSwizzler.cpp (right): https://codereview.chromium.org/1581933006/diff/20001/src/codec/SkSwizzler.cpp#newcode366 src/codec/SkSwizzler.cpp:366: static void fast_swizzle_bgra_to_n32_premul( On 2016/01/14 17:55:06, scroggo wrote: > ...
4 years, 11 months ago (2016-01-14 18:23:19 UTC) #13
msarett
https://codereview.chromium.org/1581933006/diff/20001/src/codec/SkSwizzler.cpp File src/codec/SkSwizzler.cpp (right): https://codereview.chromium.org/1581933006/diff/20001/src/codec/SkSwizzler.cpp#newcode734 src/codec/SkSwizzler.cpp:734: case kRGB_565_SkColorType: On 2016/01/14 18:14:51, scroggo wrote: > On ...
4 years, 11 months ago (2016-01-14 18:27:51 UTC) #14
scroggo
One naming nit. otherwise 1gtm. Again deferring to Mike on the details. https://codereview.chromium.org/1581933006/diff/20001/src/codec/SkSwizzler.cpp File src/codec/SkSwizzler.cpp ...
4 years, 11 months ago (2016-01-14 19:08:06 UTC) #15
msarett
I've removed the kBGRX opts because we cannot guarantee that the "X" will be "FF" ...
4 years, 11 months ago (2016-01-14 19:45:55 UTC) #16
mtklein
I looked mostly at SkSwizzler_opts.h. If there's anything tricky I should see in SkSwizzer.cpp, let ...
4 years, 11 months ago (2016-01-15 17:50:50 UTC) #17
msarett
Nothing too complicated in SkSwizzler.cpp. Leon's looked over that file. https://codereview.chromium.org/1581933006/diff/60001/src/opts/SkSwizzler_opts.h File src/opts/SkSwizzler_opts.h (right): https://codereview.chromium.org/1581933006/diff/60001/src/opts/SkSwizzler_opts.h#newcode148 ...
4 years, 11 months ago (2016-01-15 18:07:40 UTC) #18
mtklein
lgtm
4 years, 11 months ago (2016-01-15 18:50:52 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1581933006/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1581933006/80001
4 years, 11 months ago (2016-01-15 18:51:21 UTC) #21
commit-bot: I haz the power
4 years, 11 months ago (2016-01-15 19:02:39 UTC) #23
Message was sent while issue was closed.
Committed patchset #4 (id:80001) as
https://skia.googlesource.com/skia/+/03108de163354fa574679ad153b58ce57126b2ba

Powered by Google App Engine
This is Rietveld 408576698