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

Unified Diff: src/gpu/batches/GrTessellatingPathRenderer.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/GrTessellatingPathRenderer.h ('k') | tests/TessellatingPathRendererTests.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrTessellatingPathRenderer.cpp
diff --git a/src/gpu/batches/GrTessellatingPathRenderer.cpp b/src/gpu/batches/GrTessellatingPathRenderer.cpp
index 6bc8549e30a61720eddc3eacf52646c3ad99e19d..060e3f0adfe1462c479b24585b298f23bb766c50 100644
--- a/src/gpu/batches/GrTessellatingPathRenderer.cpp
+++ b/src/gpu/batches/GrTessellatingPathRenderer.cpp
@@ -109,9 +109,10 @@ bool GrTessellatingPathRenderer::onCanDrawPath(const CanDrawPathArgs& args) cons
// not do antialiasing. It can do convex and concave paths, but we'll leave the convex ones to
// simpler algorithms. Similary, we skip the non-hairlines that can be treated as hairline.
// An arbitrary path effect could produce a hairline result so we pass on those.
- return !IsStrokeHairlineOrEquivalent(*args.fStyle, *args.fViewMatrix, nullptr) &&
- !args.fStyle->strokeRec().isHairlineStyle() &&
- !args.fStyle->hasNonDashPathEffect() && !args.fAntiAlias && !args.fPath->isConvex();
+ return !IsStrokeHairlineOrEquivalent(args.fShape->style(), *args.fViewMatrix, nullptr) &&
+ !args.fShape->style().strokeRec().isHairlineStyle() &&
+ !args.fShape->style().hasNonDashPathEffect() && !args.fAntiAlias &&
+ !args.fShape->knownToBeConvex();
}
class TessellatingPathBatch : public GrVertexBatch {
@@ -292,8 +293,11 @@ bool GrTessellatingPathRenderer::onDrawPath(const DrawPathArgs& args) {
return false;
}
vmi.mapRect(&clipBounds);
- SkAutoTUnref<GrDrawBatch> batch(TessellatingPathBatch::Create(args.fColor, *args.fPath,
- *args.fStyle, *args.fViewMatrix,
+ SkPath path;
+ args.fShape->asPath(&path);
+ SkAutoTUnref<GrDrawBatch> batch(TessellatingPathBatch::Create(args.fColor, path,
+ args.fShape->style(),
+ *args.fViewMatrix,
clipBounds));
GrPipelineBuilder pipelineBuilder(*args.fPaint, args.fDrawContext->mustUseHWAA(*args.fPaint));
« no previous file with comments | « src/gpu/batches/GrTessellatingPathRenderer.h ('k') | tests/TessellatingPathRendererTests.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698