History log of /external/skia/src/core/SkStroke.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
1297ecfd1d1efaeee41153e491b160228ba4345a 24-Feb-2015 caryclark <caryclark@google.com> flip stroke to chrome compatible define

Review URL: https://codereview.chromium.org/932723003
/external/skia/src/core/SkStroke.h
04e4d08556750ff6be4576a4cd4925964c63376f 20-Feb-2015 caryclark <caryclark@google.com> This uses quad approximations of the outer and inner paths describing a stroke. Cubics and conics' thick strokes are approximated with quads as well.

The approximation uses a similar error term as the fill scan converter to determine the number of quads to use.

This also updates SampleApp QuadStroker test with conics, ovals, and stroked text.

Review URL: https://codereview.chromium.org/932113002
/external/skia/src/core/SkStroke.h
05d9044de4f1c6e791df66a425638752daac4c6b 12-Feb-2015 reed <reed@google.com> optional res-scale parameter to getFillPath

BUG=skia:
NOTREECHECKS=True
TBR=

Review URL: https://codereview.chromium.org/911053005
/external/skia/src/core/SkStroke.h
feff7d2d7719f52c7ea52db156003e609002bf04 09-Oct-2014 caryclark <caryclark@google.com> Draw more accurate thick-stroked Beziers (disabled)

Draw thick-stroked Beziers by computing the outset quadratic, measuring the error, and subdividing until the error is within a predetermined limit.

To try this CL out, change src/core/SkStroke.h:18 to

#define QUAD_STROKE_APPROXIMATION 1

or from the command line: CPPFLAGS="-D QUAD_STROKE_APPROXIMATION=1" ./gyp_skia

Here's what's in this CL:

bench/BezierBench.cpp : a microbench for examining where the time is going
gm/beziers.cpp : random Beziers with various thicknesses
gm/smallarc.cpp : a distillation of bug skia:2769
samplecode/SampleRotateCircles.cpp : controls added for error, limit, width
src/core/SkStroke.cpp : the new stroke implementation (disabled)
tests/StrokerTest.cpp : a stroke torture test that checks normal and extreme values

The new stroke algorithm has a tweakable parameter:

stroker.setError(1); (SkStrokeRec.cpp:112)

The stroke error is the allowable gap between the midpoint of the stroke quadratic and the center Bezier. As the projection from the quadratic approaches the endpoints, the error is decreased proportionally so that it is always inside the quadratic curve.

An overview of how this works:
- For a given T range of a Bezier, compute the perpendiculars and find the points outset and inset for some radius.
- Construct tangents for the quadratic stroke.
- If the tangent don't intersect between them (may happen with cubics), subdivide.
- If the quadratic stroke end points are close (again, may happen with cubics), draw a line between them.
- Compute the quadratic formed by the intersecting tangents.
- If the midpoint of the quadratic is close to the midpoint of the Bezier perpendicular, return the quadratic.
- If the end of the stroke at the Bezier midpoint doesn't intersect the quad's bounds, subdivide.
- Find where the Bezier midpoint ray intersects the quadratic.
- If the intersection is too close to the quad's endpoints, subdivide.
- If the error is large proportional to the intersection's distance to the quad's endpoints, subdivide.

BUG=skia:723,skia:2769

Review URL: https://codereview.chromium.org/558163005
/external/skia/src/core/SkStroke.h
e16efc1882ab34a0bb3ae361a2d37f840044cf87 26-Jan-2013 skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Sanitizing source files in Skia_Periodic_House_Keeping

git-svn-id: http://skia.googlecode.com/svn/trunk@7406 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkStroke.h
5f74cf8c49701f514b69dc6f1a8b5c0ffd78af0a 17-Dec-2012 sugoi@google.com <sugoi@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Follow up on the previous patch :
- Moved the SkStrokeRec class in its own file
- Replaced SkStroke by SkStrokeRec in Ganesh
- Moved path stroking to the Ganesh level in some cases (everytime it isn't required to do it directly in SkGpuDevice). PathEffect and MaskFilter still require path stroking at the SkGpuDevice for now.
- Renamed static functions in SkPath with proper names

* No functionality shold have changed with this patch. This is a step towards enabling Ganesh Path Renderers to decide whether or not to stroke the path rather than always receiving the stroked path as an input argument.

BUG=chromium:135111
TEST=Try path rendering tests from the gm
Review URL: https://codereview.appspot.com/6946072

git-svn-id: http://skia.googlecode.com/svn/trunk@6861 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkStroke.h
12b4e27ae1a29460e91a59f38122483e1faec697 06-Dec-2012 sugoi@google.com <sugoi@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> As part of preliminary groundwork for a chromium fix, this changelist is deprecating GrPathFill so that SkPath::FillType is used everywhere in order to remove some code duplication between Skia and Ganesh.

BUG=chromium:135111
TEST=Try path rendering tests from the gm
Review URL: https://codereview.appspot.com/6875058

git-svn-id: http://skia.googlecode.com/svn/trunk@6693 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkStroke.h
04fdaa1afed8687a3b15226ddebcb798c94ddac5 21-Nov-2012 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> use direction from isRect in strokeRect, and only stroke if it is closed
Review URL: https://codereview.appspot.com/6846086

git-svn-id: http://skia.googlecode.com/svn/trunk@6528 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkStroke.h
603dbedf293839e6707e2d4dfdd3949b06f9762c 20-Nov-2012 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> add specialty strokeRect() to SkStroke, which can return much cleaner results
Review URL: https://codereview.appspot.com/6843093

git-svn-id: http://skia.googlecode.com/svn/trunk@6510 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkStroke.h
58b8d4a7a861604474f77875e0236da271cac81c 03-May-2012 epoger@google.com <epoger@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> recreate http://codereview.appspot.com/6131051/ in svn instead of git
Review URL: https://codereview.appspot.com/6181044

git-svn-id: http://skia.googlecode.com/svn/trunk@3829 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkStroke.h