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

Issue 14938004: Better method for rendering ellipses (Closed)

Created:
7 years, 7 months ago by jvanverth1
Modified:
7 years, 7 months ago
CC:
skia-review_googlegroups.com
Visibility:
Public.

Description

Better method for rendering AA ellipses. This uses the standard ellipse equation as a signed distance test, and adjusts the result by the length of the gradient at that point to get a better approximation of the distance to the ellipse. It replaces the standard ellipse and roundrect shader renderers. Also adds a check to see if the curvature extrema of the stroke are less than the curvature extrema of the ellipse (i.e. the radius of curvature is larger). In this case, it's no longer an ellipse and we can't use this renderer. Only supports stroking for near-circular ellipses. Committed: http://code.google.com/p/skia/source/detail?r=9162

Patch Set 1 #

Patch Set 2 : Remove some commented out code, clean up 100+ char lines #

Patch Set 3 : Better comment for curvature extrema check #

Patch Set 4 : A little more cleanup #

Patch Set 5 : Remove RectBench change #

Patch Set 6 : Add SK_ScalarNearlyZero comment back in #

Patch Set 7 : Fix nexus_7 issue #

Patch Set 8 : Restore vector squaring #

Patch Set 9 : Fix some comments to match new code #

Patch Set 10 : Rebase to HEAD #

Patch Set 11 : Restrict stroking to near-circular ellipses; minor change to improve f.p. precision #

Total comments: 10

Patch Set 12 : Remove some unnecessary divides #

Total comments: 2

Patch Set 13 : Some perf tweaks #

Unified diffs Side-by-side diffs Delta from patch set Stats (+131 lines, -256 lines) Patch
M src/gpu/GrOvalRenderer.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 14 chunks +131 lines, -256 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
jvanverth1
Bench times on Mac: path_fill_big_oval GPU 0.60 1.00 -0.40 -66.7% path_stroke_big_oval GPU g 0.53 0.77 ...
7 years, 7 months ago (2013-05-06 14:41:41 UTC) #1
bsalomon
lgtm
7 years, 7 months ago (2013-05-06 15:17:23 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/jvanverth@google.com/14938004/11002
7 years, 7 months ago (2013-05-06 16:37:31 UTC) #3
commit-bot: I haz the power
Change committed as 9016
7 years, 7 months ago (2013-05-06 16:44:05 UTC) #4
jvanverth1
Second try, which looks like it fixes the Nexus-7 bug. The issue appeared to be ...
7 years, 7 months ago (2013-05-07 20:59:51 UTC) #5
bsalomon
lgtm
7 years, 7 months ago (2013-05-07 21:01:56 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/jvanverth@google.com/14938004/28001
7 years, 7 months ago (2013-05-08 13:53:23 UTC) #7
commit-bot: I haz the power
Change committed as 9055
7 years, 7 months ago (2013-05-08 13:59:38 UTC) #8
jvanverth1
This time for sure... I've added a check to ensure we only use 1+ width ...
7 years, 7 months ago (2013-05-14 21:09:36 UTC) #9
robertphillips
lgtm + nits https://codereview.chromium.org/14938004/diff/39001/src/gpu/GrOvalRenderer.cpp File src/gpu/GrOvalRenderer.cpp (right): https://codereview.chromium.org/14938004/diff/39001/src/gpu/GrOvalRenderer.cpp#newcode477 src/gpu/GrOvalRenderer.cpp:477: // we don't handle it if ...
7 years, 7 months ago (2013-05-14 22:44:30 UTC) #10
bsalomon
https://codereview.chromium.org/14938004/diff/42001/src/gpu/GrOvalRenderer.cpp File src/gpu/GrOvalRenderer.cpp (right): https://codereview.chromium.org/14938004/diff/42001/src/gpu/GrOvalRenderer.cpp#newcode462 src/gpu/GrOvalRenderer.cpp:462: bool isStroked = (SkStrokeRec::kStroke_Style == style || SkStrokeRec::kHairline_Style == ...
7 years, 7 months ago (2013-05-15 13:42:41 UTC) #11
jvanverth1
https://codereview.chromium.org/14938004/diff/39001/src/gpu/GrOvalRenderer.cpp File src/gpu/GrOvalRenderer.cpp (right): https://codereview.chromium.org/14938004/diff/39001/src/gpu/GrOvalRenderer.cpp#newcode477 src/gpu/GrOvalRenderer.cpp:477: // we don't handle it if curvature of the ...
7 years, 7 months ago (2013-05-15 18:34:12 UTC) #12
bsalomon
lgtm
7 years, 7 months ago (2013-05-15 20:01:36 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/jvanverth@google.com/14938004/45001
7 years, 7 months ago (2013-05-16 13:07:53 UTC) #14
commit-bot: I haz the power
7 years, 7 months ago (2013-05-16 13:14:48 UTC) #15
Message was sent while issue was closed.
Change committed as 9162

Powered by Google App Engine
This is Rietveld 408576698