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

Unified Diff: src/gpu/GrContext.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/GrContext.cpp
===================================================================
--- src/gpu/GrContext.cpp (revision 11314)
+++ src/gpu/GrContext.cpp (working copy)
@@ -1137,7 +1137,8 @@
SkStrokeRec strokeRec(stroke);
// Try a 1st time without stroking the path and without allowing the SW renderer
- GrPathRenderer* pr = this->getPathRenderer(*pathPtr, strokeRec, target, false, type);
+ GrPathRenderer* pr = this->getPathRenderer(*pathPtr, strokeRec, target, false, type,
+ pathPtr->getFillType());
if (NULL == pr) {
if (!strokeRec.isHairlineStyle()) {
@@ -1152,7 +1153,8 @@
}
// This time, allow SW renderer
- pr = this->getPathRenderer(*pathPtr, strokeRec, target, true, type);
+ pr = this->getPathRenderer(*pathPtr, strokeRec, target, true, type,
+ pathPtr->getFillType());
}
if (NULL == pr) {
@@ -1162,7 +1164,7 @@
return;
}
- pr->drawPath(*pathPtr, strokeRec, target, useAA);
+ pr->drawPath(strokeRec, target, useAA);
}
////////////////////////////////////////////////////////////////////////////////
@@ -1635,6 +1637,7 @@
const GrDrawTarget* target,
bool allowSW,
GrPathRendererChain::DrawType drawType,
+ SkPath::FillType fillType,
GrPathRendererChain::StencilSupport* stencilSupport) {
if (NULL == fPathRendererChain) {
@@ -1645,6 +1648,7 @@
stroke,
target,
drawType,
+ fillType,
stencilSupport);
if (NULL == pr && allowSW) {
@@ -1652,6 +1656,7 @@
fSoftwarePathRenderer = SkNEW_ARGS(GrSoftwarePathRenderer, (this));
}
pr = fSoftwarePathRenderer;
+ pr->setPath(path, fillType);
}
return pr;

Powered by Google App Engine
This is Rietveld 408576698