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

Issue 1072303005: use Sk4f to increase radial gradient precision but same or better speed

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

Description

use Sk4f to increase radial gradient precision but same or better speed need to land SK_SUPPORT_LEGACY_RADIAL_GRADIENT_SQRT in chrome first For benchmarks, I timed two cases: unclamped and clamped. The new code happens to treat both as clamped. On SSE, the new code is faster (and prettier): BEFORE 383/670 AFTER 276/276 On neon, the new code is slower (but still prettier) BEFORE 1.44/2.02 AFTER 2.38/2.38 Hoping to find a way to speed things up on neon, to make the decision to take this easier. BUG=skia:427508

Patch Set 1 #

Patch Set 2 : simplify stepping for more speed, experiment with rsqrt #

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+84 lines, -8 lines) Patch
M gm/gradients.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/effects/gradients/SkRadialGradient.cpp View 1 2 5 chunks +83 lines, -7 lines 0 comments Download

Messages

Total messages: 9 (3 generated)
reed1
mike, is there a faster way to extract the 4 ints from the 4 floats ...
5 years, 8 months ago (2015-04-23 19:05:46 UTC) #2
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1072303005/1
5 years, 8 months ago (2015-04-23 19:06:47 UTC) #4
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 8 months ago (2015-04-23 19:12:12 UTC) #6
robertphillips
lgtm
5 years, 8 months ago (2015-04-23 19:15:45 UTC) #7
mtklein
On 2015/04/23 19:05:46, reed1 wrote: > mike, is there a faster way to extract the ...
5 years, 8 months ago (2015-04-23 22:48:10 UTC) #8
reed2
5 years, 8 months ago (2015-04-24 00:16:40 UTC) #9
On 2015/04/23 22:48:10, mtklein wrote:
> On 2015/04/23 19:05:46, reed1 wrote:
> > mike, is there a faster way to extract the 4 ints from the 4 floats (the
> floats
> > are already scaled, so just (int) is fine)?
> 
> Yep, we can do 4x float -> 4x int quickly.

Yum.

Also, I *think* I should be scaling by 256 (or 255.999) instead of 255.

Anyway, I won't try to land this until we try your faster ints (and probably my
new scaling).

Powered by Google App Engine
This is Rietveld 408576698