Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(71)

Issue 112058: Two Point Radial Gradients

Can't Edit
Can't Publish+Mail
Start Review
Created:
15 years, 3 months ago by Stephen White
Modified:
15 years, 2 months ago
Reviewers:
reed
Base URL:
http://skia.googlecode.com/svn/trunk/
Visibility:
Public.

Description

This patch implements two point radial gradients with a a center point, a focal point, and two radii. These are required for SVG and HTML5 canvas support. The algorithm was implemented in fixed-point, like the regular radial gradient. All tiling modes (clamp, mirror, repeat) have been implemented. The 32-bit path is fully exercised by WebKit/Chrome layout tests, but the 16-bit path is not. There are also no unit tests in this patch yet, since I wasn't sure how to go about that. There is probably still some room for optimization. In particular, the SkFixedSqrt could be inlined and/or unrolled. I don't think it's possible to use the sqrt cache, since the discriminant exceeds the range provided (it gave me artifacts when I tried it).

Patch Set 1 #

Total comments: 3

Patch Set 2 : responded to comments, more optimization #

Total comments: 14

Patch Set 3 : responded to comments #

Patch Set 4 : Removed shadeSpan16 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+267 lines, -1 line) Patch
include/effects/SkGradientShader.h View 1 1 chunk +29 lines, -1 line 0 comments Download
src/effects/SkGradientShader.cpp View 1 2 3 2 chunks +238 lines, -0 lines 0 comments Download

Messages

Total messages: 9
Stephen White
15 years, 3 months ago (2009-09-01 19:26:48 UTC) #1
reed
Nice to finally have one of these. Thanks. http://codereview.appspot.com/112058/diff/1/3 File src/effects/SkGradientShader.cpp (left): http://codereview.appspot.com/112058/diff/1/3#oldcode1110 Line 1110: ...
15 years, 3 months ago (2009-09-02 20:08:39 UTC) #2
Stephen White
responded to comments, more optimization
15 years, 3 months ago (2009-09-16 22:26:59 UTC) #3
Stephen White
On 2009/09/02 20:08:39, reed wrote: > Nice to finally have one of these. Thanks. > ...
15 years, 3 months ago (2009-09-16 22:30:26 UTC) #4
reed
Again, nice work. I'd really like to start pulling each of these specialty subclasses into ...
15 years, 3 months ago (2009-09-17 14:51:37 UTC) #5
Stephen White
New version uploading now. http://codereview.appspot.com/112058/diff/4001/5002 File src/effects/SkGradientShader.cpp (right): http://codereview.appspot.com/112058/diff/4001/5002#newcode1141 Line 1141: On 2009/09/17 14:51:38, reed ...
15 years, 2 months ago (2009-09-22 14:48:04 UTC) #6
Stephen White
responded to comments
15 years, 2 months ago (2009-09-22 15:01:04 UTC) #7
reed
Lets remove the 16bit path for now. Wow, 5% just for the function-ptr instead of ...
15 years, 2 months ago (2009-09-22 15:20:12 UTC) #8
Stephen White
15 years, 2 months ago (2009-09-22 16:01:46 UTC) #9
Removed shadeSpan16
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b