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

Issue 2046063002: linear -> sRGB: use fast approximate sqrt() (Closed)

Created:
4 years, 6 months ago by mtklein_C
Modified:
4 years, 6 months ago
Reviewers:
herb_g, f(malita), 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

linear -> sRGB: use fast approximate sqrt() Since we're already approximating the sRGB gamma curve with a sqrt(), we might as well approximate with it a faster approximate sqrt(). On Intel, this .rsqrt().invert() version is 2-3x faster than .sqrt() (~3x faster on older machines, ~2x faster on newer machines). This should provide ~11 bits of precision, suspiciously exactly enough. Running dm --config srgb, there are diffs, but none perceptible. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2046063002 Committed: https://skia.googlesource.com/skia/+/3db2028126e12a9c1c1fb2f878d552a2de0e1452

Patch Set 1 #

Patch Set 2 : found another #

Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -6 lines) Patch
M src/core/SkPM4fPriv.h View 1 chunk +1 line, -1 line 0 comments Download
M src/core/SkXfermode4f.cpp View 1 chunk +4 lines, -4 lines 0 comments Download
M src/effects/gradients/Sk4fLinearGradient.cpp View 1 1 chunk +6 lines, -1 line 0 comments Download

Messages

Total messages: 20 (9 generated)
mtklein_C
Are there more performance-critical .sqrt()s for me to update?
4 years, 6 months ago (2016-06-07 17:49:15 UTC) #3
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2046063002/1
4 years, 6 months ago (2016-06-07 17:49:36 UTC) #5
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-07 18:05:03 UTC) #7
mtklein_C
+Florin Refining my grep found another spot in the linear gradient code. I think this ...
4 years, 6 months ago (2016-06-07 18:23:28 UTC) #9
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2046063002/20001
4 years, 6 months ago (2016-06-07 18:23:43 UTC) #11
herb_g
lgtm
4 years, 6 months ago (2016-06-07 18:35:47 UTC) #12
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-07 18:36:03 UTC) #14
reed1
lgtm
4 years, 6 months ago (2016-06-07 19:08:15 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2046063002/20001
4 years, 6 months ago (2016-06-07 19:11:45 UTC) #17
commit-bot: I haz the power
Committed patchset #2 (id:20001) as https://skia.googlesource.com/skia/+/3db2028126e12a9c1c1fb2f878d552a2de0e1452
4 years, 6 months ago (2016-06-07 19:12:43 UTC) #19
f(malita)
4 years, 6 months ago (2016-06-07 19:51:48 UTC) #20
Message was sent while issue was closed.
LGTM!

Powered by Google App Engine
This is Rietveld 408576698