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

Unified Diff: src/gpu/GrAAHairLinePathRenderer.cpp

Issue 23926019: Stateful PathRenderer implementation (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: clean up Created 7 years, 3 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
===================================================================
--- src/gpu/GrAAHairLinePathRenderer.cpp (revision 11314)
+++ src/gpu/GrAAHairLinePathRenderer.cpp (working copy)
@@ -819,15 +819,14 @@
return true;
}
-bool GrAAHairLinePathRenderer::canDrawPath(const SkPath& path,
- const SkStrokeRec& stroke,
+bool GrAAHairLinePathRenderer::canDrawPath(const SkStrokeRec& stroke,
const GrDrawTarget* target,
bool antiAlias) const {
if (!stroke.isHairlineStyle() || !antiAlias) {
return false;
}
- if (SkPath::kLine_SegmentMask == path.getSegmentMasks() ||
+ if (SkPath::kLine_SegmentMask == fPath.getSegmentMasks() ||
target->caps()->shaderDerivativeSupport()) {
return true;
}
@@ -871,8 +870,7 @@
return true;
}
-bool GrAAHairLinePathRenderer::onDrawPath(const SkPath& path,
- const SkStrokeRec&,
+bool GrAAHairLinePathRenderer::onDrawPath(const SkStrokeRec&,
GrDrawTarget* target,
bool antiAlias) {
@@ -889,7 +887,7 @@
PREALLOC_PTARRAY(128) conics;
IntArray qSubdivs;
FloatArray cWeights;
- quadCnt = generate_lines_and_quads(path, drawState->getViewMatrix(), devClipBounds,
+ quadCnt = generate_lines_and_quads(fPath, drawState->getViewMatrix(), devClipBounds,
&lines, &quads, &conics, &qSubdivs, &cWeights);
lineCnt = lines.count() / 2;
conicCnt = conics.count() / 3;
@@ -899,7 +897,7 @@
GrDrawTarget::AutoReleaseGeometry arg;
SkRect devBounds;
- if (!this->createLineGeom(path,
+ if (!this->createLineGeom(fPath,
target,
lines,
lineCnt,
@@ -945,7 +943,7 @@
GrDrawTarget::AutoReleaseGeometry arg;
SkRect devBounds;
- if (!this->createBezierGeom(path,
+ if (!this->createBezierGeom(fPath,
target,
quads,
quadCnt,

Powered by Google App Engine
This is Rietveld 408576698