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

Unified Diff: experimental/StrokePathRenderer/GrStrokePathRenderer.cpp

Issue 1096513002: Pass dashing information to path rasterizers. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix 100-col issue Created 5 years, 8 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
Index: experimental/StrokePathRenderer/GrStrokePathRenderer.cpp
diff --git a/experimental/StrokePathRenderer/GrStrokePathRenderer.cpp b/experimental/StrokePathRenderer/GrStrokePathRenderer.cpp
index 4b41dba5b16b6afddb15ed363ee6cabf5a6ecd87..d85ab23afb9b4ad605e347e9cf9eacca5dc16e9a 100644
--- a/experimental/StrokePathRenderer/GrStrokePathRenderer.cpp
+++ b/experimental/StrokePathRenderer/GrStrokePathRenderer.cpp
@@ -54,7 +54,7 @@ GrStrokePathRenderer::GrStrokePathRenderer() {
}
bool GrStrokePathRenderer::canDrawPath(const SkPath& path,
- const SkStrokeRec& stroke,
+ const GrStrokeInfo& stroke,
const GrDrawTarget* target,
bool antiAlias) const {
// FIXME : put the proper condition once GrDrawTarget::isOpaque is implemented
@@ -74,13 +74,13 @@ bool GrStrokePathRenderer::canDrawPath(const SkPath& path,
// Must not be filled nor hairline nor semi-transparent
// Note : May require a check to path.isConvex() if AA is supported
- return ((stroke.getStyle() == SkStrokeRec::kStroke_Style) && (maxNbVerts < maxVBSize) &&
- !path.isInverseFillType() && isOpaque && !requiresAACircle && !antiAlias &&
- ((path.getSegmentMasks() & unsupportedMask) == 0));
+ return ((stroke.getStrokeRec()->getStyle() == SkStrokeRec::kStroke_Style) &&
+ (maxNbVerts < maxVBSize) && !path.isInverseFillType() && isOpaque &&
+ !requiresAACircle && !antiAlias && ((path.getSegmentMasks() & unsupportedMask) == 0));
}
bool GrStrokePathRenderer::onDrawPath(const SkPath& origPath,
- const SkStrokeRec& stroke,
+ const GrStrokeInfo& stroke,
GrDrawTarget* target,
bool antiAlias) {
if (origPath.isEmpty()) {

Powered by Google App Engine
This is Rietveld 408576698