diff options
author | cdalton <cdalton@nvidia.com> | 2014-09-17 09:41:24 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-17 09:41:24 -0700 |
commit | 4e205b10799730b887ae5d6ac7207570292c177f (patch) | |
tree | eecda62ecd4ab4af753df6947f8b34addb5efe5a /src/gpu/GrPathRendering.h | |
parent | 149b3ec2b1ccaf00e40bf296d2a3394852d73fe9 (diff) |
Remove createPath* from GrGpu and GrContext
Now that we have the GrPathRendering class, it doesn't make sense to
have a bunch of shims on on GrGpu. This updates the path rendering
clients to make calls directly on the GrPathRendering object.
BUG=skia:2939
R=bsalomon@google.com
Author: cdalton@nvidia.com
Review URL: https://codereview.chromium.org/578563002
Diffstat (limited to 'src/gpu/GrPathRendering.h')
-rw-r--r-- | src/gpu/GrPathRendering.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/gpu/GrPathRendering.h b/src/gpu/GrPathRendering.h index 863da270c7..70fa61c27e 100644 --- a/src/gpu/GrPathRendering.h +++ b/src/gpu/GrPathRendering.h @@ -59,8 +59,26 @@ public: } } + /** + * Creates a new gpu path, based on the specified path and stroke and returns it. + * The caller owns a ref on the returned path which must be balanced by a call to unref. + * + * @param skPath the path geometry. + * @param stroke the path stroke. + * @return a new path. + */ virtual GrPath* createPath(const SkPath&, const SkStrokeRec&) = 0; + + /** + * Creates a range of gpu paths with a common stroke. The caller owns a ref on the + * returned path range which must be balanced by a call to unref. + * + * @param PathGenerator class that generates SkPath objects for each path in the range. + * @param SkStrokeRec the common stroke applied to each path in the range. + * @return a new path range. + */ virtual GrPathRange* createPathRange(size_t size, const SkStrokeRec&) = 0; + virtual void stencilPath(const GrPath*, SkPath::FillType) = 0; virtual void drawPath(const GrPath*, SkPath::FillType) = 0; virtual void drawPaths(const GrPathRange*, const uint32_t indices[], int count, |