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

Unified Diff: src/gpu/GrAADistanceFieldPathRenderer.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: src/gpu/GrAADistanceFieldPathRenderer.cpp
diff --git a/src/gpu/GrAADistanceFieldPathRenderer.cpp b/src/gpu/GrAADistanceFieldPathRenderer.cpp
index 510ea0ec9bf8b51f88b7204a9e343deb2bdc57c3..b42e064d002e3634ea7db6f37acd1580f13d6b3b 100755
--- a/src/gpu/GrAADistanceFieldPathRenderer.cpp
+++ b/src/gpu/GrAADistanceFieldPathRenderer.cpp
@@ -13,6 +13,7 @@
#include "GrBufferAllocPool.h"
#include "GrContext.h"
#include "GrPipelineBuilder.h"
+#include "GrStrokeInfo.h"
#include "GrSurfacePriv.h"
#include "GrSWMaskHelper.h"
#include "GrTexturePriv.h"
@@ -86,13 +87,13 @@ bool GrAADistanceFieldPathRenderer::canDrawPath(const GrDrawTarget* target,
const GrPipelineBuilder* pipelineBuilder,
const SkMatrix& viewMatrix,
const SkPath& path,
- const SkStrokeRec& stroke,
+ const GrStrokeInfo& stroke,
bool antiAlias) const {
// TODO: Support inverse fill
// TODO: Support strokes
if (!target->caps()->shaderDerivativeSupport() || !antiAlias || path.isInverseFillType()
- || path.isVolatile() || SkStrokeRec::kFill_Style != stroke.getStyle()) {
+ || path.isVolatile() || SkStrokeRec::kFill_Style != stroke.getStrokeRec().getStyle()) {
return false;
}
@@ -114,7 +115,7 @@ GrPathRenderer::StencilSupport
GrAADistanceFieldPathRenderer::onGetStencilSupport(const GrDrawTarget*,
const GrPipelineBuilder*,
const SkPath&,
- const SkStrokeRec&) const {
+ const GrStrokeInfo&) const {
return GrPathRenderer::kNoSupport_StencilSupport;
}
@@ -570,7 +571,7 @@ bool GrAADistanceFieldPathRenderer::onDrawPath(GrDrawTarget* target,
GrColor color,
const SkMatrix& viewMatrix,
const SkPath& path,
- const SkStrokeRec& stroke,
+ const GrStrokeInfo& stroke,
bool antiAlias) {
// we've already bailed on inverse filled paths, so this is safe
if (path.isEmpty()) {
@@ -600,7 +601,7 @@ bool GrAADistanceFieldPathRenderer::onDrawPath(GrDrawTarget* target,
(void*)this);
}
- AADistanceFieldPathBatch::Geometry geometry(stroke);
+ AADistanceFieldPathBatch::Geometry geometry(stroke.getStrokeRec());
geometry.fPath = path;
geometry.fAntiAlias = antiAlias;

Powered by Google App Engine
This is Rietveld 408576698