aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/GrResourceCacheBench.cpp
diff options
context:
space:
mode:
authorGravatar kkinnunen <kkinnunen@nvidia.com>2015-05-18 22:25:47 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-05-18 22:25:47 -0700
commit55e4783b5175fe43103c871ad8ad5cdcad208af4 (patch)
tree232424d5523aee3a181f76db6ea7aaf80f843fca /bench/GrResourceCacheBench.cpp
parentd156d36af871c23ce471a18764f4597f09cfca95 (diff)
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 Review URL: https://codereview.chromium.org/1124423007
Diffstat (limited to 'bench/GrResourceCacheBench.cpp')
0 files changed, 0 insertions, 0 deletions