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

Unified Diff: src/gpu/GrAAHairLinePathRenderer.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/GrAAHairLinePathRenderer.cpp
diff --git a/src/gpu/GrAAHairLinePathRenderer.cpp b/src/gpu/GrAAHairLinePathRenderer.cpp
index 1cbd93b9f868e8cbea9a081faa9b8b8143af9afa..c205a4e5e27ebdfca6cf680f7e0265d7440b69a5 100644
--- a/src/gpu/GrAAHairLinePathRenderer.cpp
+++ b/src/gpu/GrAAHairLinePathRenderer.cpp
@@ -18,6 +18,7 @@
#include "GrPathUtils.h"
#include "GrPipelineBuilder.h"
#include "GrProcessor.h"
+#include "GrStrokeInfo.h"
#include "SkGeometry.h"
#include "SkStroke.h"
#include "SkTemplates.h"
@@ -637,13 +638,13 @@ bool GrAAHairLinePathRenderer::canDrawPath(const GrDrawTarget* target,
const GrPipelineBuilder* pipelineBuilder,
const SkMatrix& viewMatrix,
const SkPath& path,
- const SkStrokeRec& stroke,
+ const GrStrokeInfo& stroke,
bool antiAlias) const {
if (!antiAlias) {
return false;
}
- if (!IsStrokeHairlineOrEquivalent(stroke, viewMatrix, NULL)) {
+ if (!IsStrokeHairlineOrEquivalent(stroke.getStrokeRec(), viewMatrix, NULL)) {
return false;
}
@@ -1029,7 +1030,7 @@ bool GrAAHairLinePathRenderer::onDrawPath(GrDrawTarget* target,
GrColor color,
const SkMatrix& viewMatrix,
const SkPath& path,
- const SkStrokeRec& stroke,
+ const GrStrokeInfo& stroke,
bool) {
if (!fLinesIndexBuffer || !fQuadsIndexBuffer) {
SkDebugf("unable to allocate indices\n");
@@ -1038,7 +1039,7 @@ bool GrAAHairLinePathRenderer::onDrawPath(GrDrawTarget* target,
SkScalar hairlineCoverage;
uint8_t newCoverage = 0xff;
- if (IsStrokeHairlineOrEquivalent(stroke, viewMatrix, &hairlineCoverage)) {
+ if (IsStrokeHairlineOrEquivalent(stroke.getStrokeRec(), viewMatrix, &hairlineCoverage)) {
newCoverage = SkScalarRoundToInt(hairlineCoverage * 0xff);
}

Powered by Google App Engine
This is Rietveld 408576698