aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/batches/GrDashLinePathRenderer.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2016-06-28 10:41:34 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-06-28 10:41:35 -0700
commitc62318c748a1907649bd75382c4f4fd10533f2b3 (patch)
tree5f27386533260d1c9dedffe708fb03259d5af039 /src/gpu/batches/GrDashLinePathRenderer.cpp
parent0829e49af2d70d9d33ba3b6b43d2114bcf5c95df (diff)
Make lines a special case in GrShape
Diffstat (limited to 'src/gpu/batches/GrDashLinePathRenderer.cpp')
-rw-r--r--src/gpu/batches/GrDashLinePathRenderer.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gpu/batches/GrDashLinePathRenderer.cpp b/src/gpu/batches/GrDashLinePathRenderer.cpp
index 8dba7b94da..e7ef2402a9 100644
--- a/src/gpu/batches/GrDashLinePathRenderer.cpp
+++ b/src/gpu/batches/GrDashLinePathRenderer.cpp
@@ -13,7 +13,10 @@
bool GrDashLinePathRenderer::onCanDrawPath(const CanDrawPathArgs& args) const {
SkPoint pts[2];
- if (args.fShape->style().isDashed() && args.fShape->asLine(pts)) {
+ bool inverted;
+ if (args.fShape->style().isDashed() && args.fShape->asLine(pts, &inverted)) {
+ // We should never have an inverse dashed case.
+ SkASSERT(!inverted);
return GrDashingEffect::CanDrawDashLine(pts, args.fShape->style(), *args.fViewMatrix);
}
return false;
@@ -34,7 +37,7 @@ bool GrDashLinePathRenderer::onDrawPath(const DrawPathArgs& args) {
aaMode = GrDashingEffect::AAMode::kNone;
}
SkPoint pts[2];
- SkAssertResult(args.fShape->asLine(pts));
+ SkAssertResult(args.fShape->asLine(pts, nullptr));
SkAutoTUnref<GrDrawBatch> batch(GrDashingEffect::CreateDashLineBatch(args.fColor,
*args.fViewMatrix,
pts,