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

Unified Diff: src/gpu/batches/GrAAConvexPathRenderer.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/GrStyle.h ('k') | src/gpu/batches/GrAADistanceFieldPathRenderer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrAAConvexPathRenderer.cpp
diff --git a/src/gpu/batches/GrAAConvexPathRenderer.cpp b/src/gpu/batches/GrAAConvexPathRenderer.cpp
index 390162ede2f24acf0d08640601e0f0de29aa419f..bb097aafad9c149d638eccc3a30a04289c9cc06e 100644
--- a/src/gpu/batches/GrAAConvexPathRenderer.cpp
+++ b/src/gpu/batches/GrAAConvexPathRenderer.cpp
@@ -681,8 +681,8 @@ sk_sp<GrGeometryProcessor> QuadEdgeEffect::TestCreate(GrProcessorTestData* d) {
bool GrAAConvexPathRenderer::onCanDrawPath(const CanDrawPathArgs& args) const {
return (args.fShaderCaps->shaderDerivativeSupport() && args.fAntiAlias &&
- args.fStyle->isSimpleFill() && !args.fPath->isInverseFillType() &&
- args.fPath->isConvex());
+ args.fShape->style().isSimpleFill() && !args.fShape->inverseFilled() &&
+ args.fShape->knownToBeConvex());
}
// extract the result vertices and indices from the GrAAConvexTessellator
@@ -998,15 +998,12 @@ bool GrAAConvexPathRenderer::onDrawPath(const DrawPathArgs& args) {
GR_AUDIT_TRAIL_AUTO_FRAME(args.fDrawContext->auditTrail(),
"GrAAConvexPathRenderer::onDrawPath");
SkASSERT(!args.fDrawContext->isUnifiedMultisampled());
-
- if (args.fPath->isEmpty()) {
- return true;
- }
+ SkASSERT(!args.fShape->isEmpty());
AAConvexPathBatch::Geometry geometry;
geometry.fColor = args.fColor;
geometry.fViewMatrix = *args.fViewMatrix;
- geometry.fPath = *args.fPath;
+ args.fShape->asPath(&geometry.fPath);
SkAutoTUnref<GrDrawBatch> batch(AAConvexPathBatch::Create(geometry));
« no previous file with comments | « src/gpu/GrStyle.h ('k') | src/gpu/batches/GrAADistanceFieldPathRenderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698