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

Issue 1230663005: 3-15% speedup to HardLight / Overlay xfermodes. (Closed)

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

Description

3-15% speedup to HardLight / Overlay xfermodes. While investigating my bug (skia:4052) I saw this TODO and figured it'd make me feel better about an otherwise unsuccessful investigation. This speeds up HardLight and Overlay (same code) by about 15% with SSE, mostly by rewriting the logic from 1 cheap comparison and 2 expensive div255() calls to 2 cheap comparisons and 1 expensive div255(). NEON speeds up by a more modest ~3%. BUG=skia: Committed: https://skia.googlesource.com/skia/+/4be181e304d2b280c6801bd13369cfba236d1a66

Patch Set 1 #

Patch Set 2 : neon + portable #

Patch Set 3 : more readable #

Patch Set 4 : LoHi is more consistent with other lo-hi ordering. #

Patch Set 5 : Add a test that widenLo() | widenHi() == widenLoHi() #

Unified diffs Side-by-side diffs Delta from patch set Stats (+43 lines, -4 lines) Patch
M src/core/Sk4px.h View 1 2 3 2 chunks +2 lines, -0 lines 0 comments Download
M src/core/Sk4pxXfermode.h View 1 2 3 1 chunk +2 lines, -4 lines 0 comments Download
M src/opts/Sk4px_NEON.h View 1 2 3 1 chunk +6 lines, -0 lines 0 comments Download
M src/opts/Sk4px_SSE2.h View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M src/opts/Sk4px_none.h View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M src/opts/SkNx_neon.h View 1 1 chunk +5 lines, -0 lines 0 comments Download
M src/opts/SkNx_sse.h View 1 chunk +5 lines, -0 lines 0 comments Download
M tests/SkNxTest.cpp View 1 2 3 4 1 chunk +16 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (6 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1230663005/20001
5 years, 5 months ago (2015-07-13 21:50:44 UTC) #2
mtklein_C
5 years, 5 months ago (2015-07-13 22:21:55 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1230663005/60001
5 years, 5 months ago (2015-07-13 22:22:17 UTC) #6
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 5 months ago (2015-07-13 22:30:44 UTC) #8
reed1
add a unittest? I presume widenLoHi == widenLo | widenHi ? lgtm
5 years, 5 months ago (2015-07-14 13:55:36 UTC) #9
mtklein_C
On 2015/07/14 13:55:36, reed1 wrote: > add a unittest? Done. > I presume widenLoHi == ...
5 years, 5 months ago (2015-07-14 14:34:03 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1230663005/80001
5 years, 5 months ago (2015-07-14 14:34:48 UTC) #13
commit-bot: I haz the power
5 years, 5 months ago (2015-07-14 17:54:23 UTC) #14
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://skia.googlesource.com/skia/+/4be181e304d2b280c6801bd13369cfba236d1a66

Powered by Google App Engine
This is Rietveld 408576698