diff options
Diffstat (limited to 'src/gpu/GrAAHairLinePathRenderer.cpp')
-rw-r--r-- | src/gpu/GrAAHairLinePathRenderer.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/gpu/GrAAHairLinePathRenderer.cpp b/src/gpu/GrAAHairLinePathRenderer.cpp index 7f152661f1..830f513e6c 100644 --- a/src/gpu/GrAAHairLinePathRenderer.cpp +++ b/src/gpu/GrAAHairLinePathRenderer.cpp @@ -826,7 +826,8 @@ bool GrAAHairLinePathRenderer::createBezierGeom( return true; } -bool GrAAHairLinePathRenderer::canDrawPath(const SkStrokeRec& stroke, +bool GrAAHairLinePathRenderer::canDrawPath(const SkPath& path, + const SkStrokeRec& stroke, const GrDrawTarget* target, bool antiAlias) const { if (!antiAlias) { @@ -839,7 +840,7 @@ bool GrAAHairLinePathRenderer::canDrawPath(const SkStrokeRec& stroke, return false; } - if (SkPath::kLine_SegmentMask == this->path().getSegmentMasks() || + if (SkPath::kLine_SegmentMask == path.getSegmentMasks() || target->caps()->shaderDerivativeSupport()) { return true; } @@ -883,7 +884,8 @@ bool check_bounds(GrDrawState* drawState, const SkRect& devBounds, void* vertice return true; } -bool GrAAHairLinePathRenderer::onDrawPath(const SkStrokeRec& stroke, +bool GrAAHairLinePathRenderer::onDrawPath(const SkPath& path, + const SkStrokeRec& stroke, GrDrawTarget* target, bool antiAlias) { GrDrawState* drawState = target->drawState(); @@ -908,7 +910,7 @@ bool GrAAHairLinePathRenderer::onDrawPath(const SkStrokeRec& stroke, PREALLOC_PTARRAY(128) conics; IntArray qSubdivs; FloatArray cWeights; - quadCnt = generate_lines_and_quads(this->path(), drawState->getViewMatrix(), devClipBounds, + quadCnt = generate_lines_and_quads(path, drawState->getViewMatrix(), devClipBounds, &lines, &quads, &conics, &qSubdivs, &cWeights); lineCnt = lines.count() / 2; conicCnt = conics.count() / 3; @@ -918,7 +920,7 @@ bool GrAAHairLinePathRenderer::onDrawPath(const SkStrokeRec& stroke, GrDrawTarget::AutoReleaseGeometry arg; SkRect devBounds; - if (!this->createLineGeom(this->path(), + if (!this->createLineGeom(path, target, lines, lineCnt, @@ -964,7 +966,7 @@ bool GrAAHairLinePathRenderer::onDrawPath(const SkStrokeRec& stroke, GrDrawTarget::AutoReleaseGeometry arg; SkRect devBounds; - if (!this->createBezierGeom(this->path(), + if (!this->createBezierGeom(path, target, quads, quadCnt, |