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

Unified Diff: src/gpu/GrContext.cpp

Issue 23926019: Stateful PathRenderer implementation (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Updated to ToT (13203) Created 6 years, 11 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 13203)
+++ src/gpu/GrContext.cpp (working copy)
@@ -1155,7 +1155,8 @@
SkTCopyOnFirstWrite<SkStrokeRec> stroke(origStroke);
// Try a 1st time without stroking the path and without allowing the SW renderer
- GrPathRenderer* pr = this->getPathRenderer(*pathPtr, *stroke, target, false, type);
+ GrPathRenderer* pr = this->getPathRenderer(*pathPtr, *stroke, target, false, type,
+ pathPtr->getFillType());
if (NULL == pr) {
if (!GrPathRenderer::IsStrokeHairlineOrEquivalent(*stroke, this->getMatrix(), NULL)) {
@@ -1170,7 +1171,8 @@
}
// This time, allow SW renderer
- pr = this->getPathRenderer(*pathPtr, *stroke, target, true, type);
+ pr = this->getPathRenderer(*pathPtr, *stroke, target, true, type,
+ pathPtr->getFillType());
}
if (NULL == pr) {
@@ -1180,7 +1182,7 @@
return;
}
- pr->drawPath(*pathPtr, *stroke, target, useCoverageAA);
+ pr->drawPath(*stroke, target, useCoverageAA);
}
////////////////////////////////////////////////////////////////////////////////
@@ -1676,6 +1678,7 @@
const GrDrawTarget* target,
bool allowSW,
GrPathRendererChain::DrawType drawType,
+ SkPath::FillType fillType,
GrPathRendererChain::StencilSupport* stencilSupport) {
if (NULL == fPathRendererChain) {
@@ -1686,6 +1689,7 @@
stroke,
target,
drawType,
+ fillType,
stencilSupport);
if (NULL == pr && allowSW) {
@@ -1693,6 +1697,7 @@
fSoftwarePathRenderer = SkNEW_ARGS(GrSoftwarePathRenderer, (this));
}
pr = fSoftwarePathRenderer;
+ pr->setPath(path, fillType);
}
return pr;

Powered by Google App Engine
This is Rietveld 408576698