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

Issue 1124423007: Improve NVPR stroke accuracy to fix thick strokes (Closed)

Created:
5 years, 7 months ago by Kimmo Kinnunen
Modified:
5 years, 7 months ago
Reviewers:
bsalomon
CC:
reviews_skia.org, Chris Dalton, vbuzinov
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Improve NVPR stroke accuracy to fix thick strokes Set the "path stroke error bound" path parameter to 0.02 for all paths. This means that the stroked path area will be within 98% of the stroke width in path space. This should fix many cases where NVPR stroked paths were visibly different to Skia stroked paths. One such path is in dashcubics gm. This increases the amount of subdivisions the path object creation will make for paths that need it. This in turn will increase gpu object space requirements sligthly. Both of these effects should be unnoticeable. GL_NV_path_rendering.txt: """ Every path object has a stroke approximation bound parameter (PATH_STROKE_BOUND_NV) that is a floating-point value /sab/ clamped between 0.0 and 1.0 and set and queried with the PATH_STROKE_BOUND_NV path parameter. Exact determination of samples swept an orthogonal centered line segment along cubic Bezier segments and rational quadratic Bezier curves (so non-circular partial elliptical arcs) is intractable for real-time rendering so an approximation is required; /sab/ intuitively bounds the approximation error as a percentage of the path object's stroke width. Specifically, this path parameter requests the implementation to stencil any samples within /sweep/ object space units of the exact sweep of the path's cubic Bezier segments or partial elliptical arcs to be sampled by the stroke where sweep = ((1-sab)*sw)/2 where /sw/ is the path object's stroke width. The initial value of /sab/ when a path is created is 0.2. In practical terms, this initial value means the stencil sample positions coverage within 80% (100%-20%) of the stroke width of cubic and rational quadratic stroke segments should be sampled. """ BUG=skia:2049 Committed: https://skia.googlesource.com/skia/+/55e4783b5175fe43103c871ad8ad5cdcad208af4

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -0 lines) Patch
M src/gpu/gl/GrGLDefines.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/gpu/gl/GrGLPath.cpp View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 6 (2 generated)
Kimmo Kinnunen
5 years, 7 months ago (2015-05-18 11:50:03 UTC) #2
bsalomon
lgtm
5 years, 7 months ago (2015-05-18 13:10:45 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1124423007/1
5 years, 7 months ago (2015-05-19 05:17:59 UTC) #5
commit-bot: I haz the power
5 years, 7 months ago (2015-05-19 05:25:51 UTC) #6
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://skia.googlesource.com/skia/+/55e4783b5175fe43103c871ad8ad5cdcad208af4

Powered by Google App Engine
This is Rietveld 408576698