aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrPath.h
diff options
context:
space:
mode:
authorGravatar cdalton <cdalton@nvidia.com>2014-07-21 15:32:44 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-07-21 15:32:44 -0700
commitb85a0aab6905af8b329539b7573a7555b727d5e5 (patch)
tree9e178f1cbd5c77cc3a522c54b529b50267d89e01 /src/gpu/GrPath.h
parentdcabb05113a732636691abc16d643a091336aea5 (diff)
Add a GrPathRange class
Adds a GrPathRange object that represents a range of paths on the gpu. Updates GrDrawTarget::drawPaths and supporting code to use GrPathRange instead of an array of GrPath objects. Change-Id: I67845f3893cd4d955db947d699aa3733cbb081e0 BUG=skia: R=bsalomon@google.com, jvanverth@google.com, kkinnunen@nvidia.com Author: cdalton@nvidia.com Review URL: https://codereview.chromium.org/400713003
Diffstat (limited to 'src/gpu/GrPath.h')
-rw-r--r--src/gpu/GrPath.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gpu/GrPath.h b/src/gpu/GrPath.h
index d324e6a745..2c0040cbf2 100644
--- a/src/gpu/GrPath.h
+++ b/src/gpu/GrPath.h
@@ -18,6 +18,9 @@ class GrPath : public GrGpuObject {
public:
SK_DECLARE_INST_COUNT(GrPath);
+ /**
+ * Initialize to a path with a fixed stroke. Stroke must not be hairline.
+ */
GrPath(GrGpu* gpu, bool isWrapped, const SkPath& skPath, const SkStrokeRec& stroke)
: INHERITED(gpu, isWrapped),
fSkPath(skPath),
@@ -26,6 +29,7 @@ public:
}
static GrResourceKey ComputeKey(const SkPath& path, const SkStrokeRec& stroke);
+ static uint64_t ComputeStrokeKey(const SkStrokeRec&);
bool isEqualTo(const SkPath& path, const SkStrokeRec& stroke) {
return fSkPath == path && fStroke == stroke;