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

Issue 1098913002: Convert Color32 code to perfect blend. (Closed)

Created:
5 years, 8 months ago by mtklein_C
Modified:
5 years, 8 months ago
Reviewers:
f(malita), mtklein, reed1
CC:
reviews_skia.org, caryclark
Base URL:
https://skia.googlesource.com/skia@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Convert Color32 code to perfect blend. Before we commit to blend_256_round_alt, let's make sure blend_perfect is really slower in practice (i.e. regresses on perf.skia.org). blend_perfect is really the most desirable algorithm if we can afford it. Not only is it correct, but it's easy to think about and break into correct pieces: for instance, its div255() doesn't require any coordination with the multiply. This looks like a 30% hit according to microbenches. That said, microbenches said my previous change would be a 20-25% perf improvement, but it didn't end up showing a significant effect at a high level. As for correctness, I see a bunch of off-by-1 compared to blend_256_round_alt (exactly what we'd expect), and one off-by-3 in a GM that looks like it has a bunch of overdraw. BUG=skia: Committed: https://skia.googlesource.com/skia/+/61221e7f87a99765b0e034020e06bb018e2a08c2

Patch Set 1 #

Patch Set 2 : fix portable rounding #

Patch Set 3 : ugh, really fix #

Patch Set 4 : fix portable math #

Patch Set 5 : back to vaddhn #

Patch Set 6 : revert back to make more similar #

Unified diffs Side-by-side diffs Delta from patch set Stats (+42 lines, -64 lines) Patch
M src/core/SkBlitRow_D32.cpp View 1 2 3 2 chunks +12 lines, -15 lines 0 comments Download
M src/opts/SkBlitRow_opts_SSE2.cpp View 1 2 3 4 5 1 chunk +16 lines, -27 lines 0 comments Download
M src/opts/SkBlitRow_opts_arm_neon.cpp View 1 2 3 4 1 chunk +14 lines, -22 lines 0 comments Download

Messages

Total messages: 21 (6 generated)
mtklein_C
5 years, 8 months ago (2015-04-20 16:19:27 UTC) #2
mtklein_C
5 years, 8 months ago (2015-04-20 16:19:40 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/1098913002/100001
5 years, 8 months ago (2015-04-20 16:19:58 UTC) #6
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 8 months ago (2015-04-20 16:27:01 UTC) #8
mtklein
https://perf.skia.org/#3238 plots the geometric mean of 8888 SKP runs over time. Just wanted to post ...
5 years, 8 months ago (2015-04-20 17:39:11 UTC) #10
mtklein
I'm going to land this before review so that the perf and test bots can ...
5 years, 8 months ago (2015-04-20 17:51:49 UTC) #11
mtklein
lgtm
5 years, 8 months ago (2015-04-20 17:51:55 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1098913002/100001
5 years, 8 months ago (2015-04-20 17:52:18 UTC) #14
commit-bot: I haz the power
Committed patchset #6 (id:100001) as https://skia.googlesource.com/skia/+/61221e7f87a99765b0e034020e06bb018e2a08c2
5 years, 8 months ago (2015-04-20 17:52:32 UTC) #15
reed1
I am nervous with such a large perf hit, even if it is *only* in ...
5 years, 8 months ago (2015-04-20 18:53:33 UTC) #16
reed1
5 years, 8 months ago (2015-04-20 18:53:47 UTC) #17
mtklein
So far, with most but not all bots reporting in, I see no downside to ...
5 years, 8 months ago (2015-04-20 19:05:21 UTC) #18
reed1
Hmmm, if we assume SKPs are the only measure of our library and its performance. ...
5 years, 8 months ago (2015-04-20 19:10:29 UTC) #19
mtklein
On 2015/04/20 19:10:29, reed1 wrote: > Hmmm, if we assume SKPs are the only measure ...
5 years, 8 months ago (2015-04-20 22:15:11 UTC) #20
mtklein
5 years, 8 months ago (2015-04-21 15:09:15 UTC) #21
Message was sent while issue was closed.
A revert of this CL (patchset #6 id:100001) has been created in
https://codereview.chromium.org/1083923006/ by mtklein@google.com.

The reason for reverting is: Xfermode_SrcOver not looking encouraging.  Up to
50% regressions.

https://perf.skia.org/#3242.

Powered by Google App Engine
This is Rietveld 408576698