aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrAAHairLinePathRenderer.cpp
diff options
context:
space:
mode:
authorGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-02-10 16:46:23 +0000
committerGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-02-10 16:46:23 +0000
commit3e0c64ad1e5e12aca2907a1384ee7dc3d39d5148 (patch)
treef52833d3ae2b671a3b0dfa890b912fc5611bb7cb /src/gpu/GrAAHairLinePathRenderer.cpp
parent0888b7534c4b3b1cb17ac428881334e1169c3d9f (diff)
Stateful PathRenderer implementation
Diffstat (limited to 'src/gpu/GrAAHairLinePathRenderer.cpp')
-rw-r--r--src/gpu/GrAAHairLinePathRenderer.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/gpu/GrAAHairLinePathRenderer.cpp b/src/gpu/GrAAHairLinePathRenderer.cpp
index 830f513e6c..7f152661f1 100644
--- a/src/gpu/GrAAHairLinePathRenderer.cpp
+++ b/src/gpu/GrAAHairLinePathRenderer.cpp
@@ -826,8 +826,7 @@ bool GrAAHairLinePathRenderer::createBezierGeom(
return true;
}
-bool GrAAHairLinePathRenderer::canDrawPath(const SkPath& path,
- const SkStrokeRec& stroke,
+bool GrAAHairLinePathRenderer::canDrawPath(const SkStrokeRec& stroke,
const GrDrawTarget* target,
bool antiAlias) const {
if (!antiAlias) {
@@ -840,7 +839,7 @@ bool GrAAHairLinePathRenderer::canDrawPath(const SkPath& path,
return false;
}
- if (SkPath::kLine_SegmentMask == path.getSegmentMasks() ||
+ if (SkPath::kLine_SegmentMask == this->path().getSegmentMasks() ||
target->caps()->shaderDerivativeSupport()) {
return true;
}
@@ -884,8 +883,7 @@ bool check_bounds(GrDrawState* drawState, const SkRect& devBounds, void* vertice
return true;
}
-bool GrAAHairLinePathRenderer::onDrawPath(const SkPath& path,
- const SkStrokeRec& stroke,
+bool GrAAHairLinePathRenderer::onDrawPath(const SkStrokeRec& stroke,
GrDrawTarget* target,
bool antiAlias) {
GrDrawState* drawState = target->drawState();
@@ -910,7 +908,7 @@ bool GrAAHairLinePathRenderer::onDrawPath(const SkPath& path,
PREALLOC_PTARRAY(128) conics;
IntArray qSubdivs;
FloatArray cWeights;
- quadCnt = generate_lines_and_quads(path, drawState->getViewMatrix(), devClipBounds,
+ quadCnt = generate_lines_and_quads(this->path(), drawState->getViewMatrix(), devClipBounds,
&lines, &quads, &conics, &qSubdivs, &cWeights);
lineCnt = lines.count() / 2;
conicCnt = conics.count() / 3;
@@ -920,7 +918,7 @@ bool GrAAHairLinePathRenderer::onDrawPath(const SkPath& path,
GrDrawTarget::AutoReleaseGeometry arg;
SkRect devBounds;
- if (!this->createLineGeom(path,
+ if (!this->createLineGeom(this->path(),
target,
lines,
lineCnt,
@@ -966,7 +964,7 @@ bool GrAAHairLinePathRenderer::onDrawPath(const SkPath& path,
GrDrawTarget::AutoReleaseGeometry arg;
SkRect devBounds;
- if (!this->createBezierGeom(path,
+ if (!this->createBezierGeom(this->path(),
target,
quads,
quadCnt,