Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(554)

Unified Diff: src/gpu/batches/GrDashLinePathRenderer.cpp

Issue 2081383006: Use GrShape in GrPathRenderer. (Closed) Base URL: https://chromium.googlesource.com/skia.git@shapemembers
Patch Set: Address comments Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/batches/GrDashLinePathRenderer.h ('k') | src/gpu/batches/GrDefaultPathRenderer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrDashLinePathRenderer.cpp
diff --git a/src/gpu/batches/GrDashLinePathRenderer.cpp b/src/gpu/batches/GrDashLinePathRenderer.cpp
index a442b665595c44b3285c6ff89ddcaf610d7101f9..8dba7b94da757b35df3981fcfa43645a6837a8ed 100644
--- a/src/gpu/batches/GrDashLinePathRenderer.cpp
+++ b/src/gpu/batches/GrDashLinePathRenderer.cpp
@@ -13,8 +13,8 @@
bool GrDashLinePathRenderer::onCanDrawPath(const CanDrawPathArgs& args) const {
SkPoint pts[2];
- if (args.fStyle->isDashed() && args.fPath->isLine(pts)) {
- return GrDashingEffect::CanDrawDashLine(pts, *args.fStyle, *args.fViewMatrix);
+ if (args.fShape->style().isDashed() && args.fShape->asLine(pts)) {
+ return GrDashingEffect::CanDrawDashLine(pts, args.fShape->style(), *args.fViewMatrix);
}
return false;
}
@@ -34,12 +34,12 @@ bool GrDashLinePathRenderer::onDrawPath(const DrawPathArgs& args) {
aaMode = GrDashingEffect::AAMode::kNone;
}
SkPoint pts[2];
- SkAssertResult(args.fPath->isLine(pts));
+ SkAssertResult(args.fShape->asLine(pts));
SkAutoTUnref<GrDrawBatch> batch(GrDashingEffect::CreateDashLineBatch(args.fColor,
*args.fViewMatrix,
pts,
aaMode,
- *args.fStyle));
+ args.fShape->style()));
if (!batch) {
return false;
}
« no previous file with comments | « src/gpu/batches/GrDashLinePathRenderer.h ('k') | src/gpu/batches/GrDefaultPathRenderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698