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

Issue 1813263002: custom ssse3 srcover_n_srgb_bw, about 1.8x faster (Closed)

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

Description

custom ssse3 srcover_n_srgb_bw, about 1.8x speedup This is a little demo of the sorts of speedups we can get from working in planar format, or even just a mini-planar of 4 pixels at a time like I'm doing here. I chose this blit by running $ out/Release/nanobench --config srgb --match skp and looking for the hottest sRGB-related method. After this CL, src_1 and src_n become hotter than srcover_n. They can probably get a similar treatment. We transpose three times in this function: - dst after reading, as part of the zero-extension and conversion to float - src after reading, _MM_TRANSPOSE4_PS (which expands to 8 cheap instructions) - result before writing, the last _mm_shuffle_epi8 If we changed our buffer format to a mini-planar format like rrrr gggg bbbb aaaa, we could eliminate the src transpose and get another small speedup, to right around 2x. This code leans pretty heavily on SSSE3, so if we want it to speed up Windows+Linux Chrome, it'll eventually want to go behind a function pointer. This also appears to fix what looks like overflow in a few GMs, most noticeably in hairmodes. This is something we'd better look into... BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1813263002 Committed: https://skia.googlesource.com/skia/+/dbd94e2bb265b34c2d9bf82624909fef84a7217e

Patch Set 1 #

Patch Set 2 : undo #

Unified diffs Side-by-side diffs Delta from patch set Stats (+99 lines, -9 lines) Patch
M src/core/SkXfermode4f.cpp View 1 6 chunks +99 lines, -9 lines 0 comments Download

Messages

Total messages: 18 (12 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/1813263002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1813263002/20001
4 years, 9 months ago (2016-03-18 16:34:08 UTC) #9
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 9 months ago (2016-03-18 16:43:20 UTC) #11
mtklein_C
4 years, 9 months ago (2016-03-18 16:44:11 UTC) #13
reed1
lgtm
4 years, 9 months ago (2016-03-18 16:54:57 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1813263002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1813263002/20001
4 years, 9 months ago (2016-03-18 18:06:48 UTC) #16
commit-bot: I haz the power
4 years, 9 months ago (2016-03-18 18:07:49 UTC) #18
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://skia.googlesource.com/skia/+/dbd94e2bb265b34c2d9bf82624909fef84a7217e

Powered by Google App Engine
This is Rietveld 408576698