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

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

Issue 2006643005: Start on replacing path+style with shape in patherenderer (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: rebase after breaking out more 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/GrMSAAPathRenderer.cpp ('k') | src/gpu/batches/GrStencilAndCoverPathRenderer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrPLSPathRenderer.cpp
diff --git a/src/gpu/batches/GrPLSPathRenderer.cpp b/src/gpu/batches/GrPLSPathRenderer.cpp
index a81b8831edee14c97dfcc86482dbd9e89b65878d..ba84d73a7b1810ca41c9875f36855ca340c97d03 100644
--- a/src/gpu/batches/GrPLSPathRenderer.cpp
+++ b/src/gpu/batches/GrPLSPathRenderer.cpp
@@ -777,9 +777,11 @@ private:
bool GrPLSPathRenderer::onCanDrawPath(const CanDrawPathArgs& args) const {
// We have support for even-odd rendering, but are having some troublesome
// seams. Disable in the presence of even-odd for now.
+ SkPath path;
+ args.fShape->asPath(&path);
return args.fShaderCaps->shaderDerivativeSupport() && args.fAntiAlias &&
- args.fStyle->isSimpleFill() && !args.fPath->isInverseFillType() &&
- args.fPath->getFillType() == SkPath::FillType::kWinding_FillType;
+ args.fShape->style().isSimpleFill() && !path.isInverseFillType() &&
+ path.getFillType() == SkPath::FillType::kWinding_FillType;
}
class PLSPathBatch : public GrVertexBatch {
@@ -974,15 +976,13 @@ private:
SkDEBUGCODE(bool inPLSDraw = false;)
bool GrPLSPathRenderer::onDrawPath(const DrawPathArgs& args) {
- if (args.fPath->isEmpty()) {
- return true;
- }
+ SkASSERT(!args.fShape->isEmpty())
SkASSERT(!inPLSDraw);
SkDEBUGCODE(inPLSDraw = true;)
PLSPathBatch::Geometry geometry;
geometry.fColor = args.fColor;
geometry.fViewMatrix = *args.fViewMatrix;
- geometry.fPath = *args.fPath;
+ args.fShape->asPath(&geometry.fPath);
SkAutoTUnref<GrDrawBatch> batch(PLSPathBatch::Create(geometry));
« no previous file with comments | « src/gpu/batches/GrMSAAPathRenderer.cpp ('k') | src/gpu/batches/GrStencilAndCoverPathRenderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698