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

Unified Diff: src/gpu/GrDrawContext.cpp

Issue 1407883004: Remove GrPipelineBuilder from getPathRenderer call (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 2 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/GrDrawContext.cpp
diff --git a/src/gpu/GrDrawContext.cpp b/src/gpu/GrDrawContext.cpp
index d64273a8288bcb776d22a44190c3999258e97e21..a5ec95409bcf6a1437b1fe2b239243e1ec8e1538 100644
--- a/src/gpu/GrDrawContext.cpp
+++ b/src/gpu/GrDrawContext.cpp
@@ -680,21 +680,22 @@ void GrDrawContext::internalDrawPath(GrPipelineBuilder* pipelineBuilder,
// thing WRT to the blend then we'll need some query on the PR.
bool useCoverageAA = useAA &&
!pipelineBuilder->getRenderTarget()->isUnifiedMultisampled();
-
+ bool isStencilDisabled = pipelineBuilder->getStencil().isDisabled();
+ bool isStencilBufferMSAA = pipelineBuilder->getRenderTarget()->isStencilBufferMultisampled();
GrPathRendererChain::DrawType type =
- useCoverageAA ? GrPathRendererChain::kColorAntiAlias_DrawType :
- GrPathRendererChain::kColor_DrawType;
+ useCoverageAA ? GrPathRendererChain::kColorAntiAlias_DrawType
+ : GrPathRendererChain::kColor_DrawType;
const SkPath* pathPtr = &path;
SkTLazy<SkPath> tmpPath;
const GrStrokeInfo* strokeInfoPtr = &strokeInfo;
// Try a 1st time without stroking the path and without allowing the SW renderer
- GrPathRenderer* pr = fDrawingManager->getContext()->getPathRenderer(*pipelineBuilder,
- viewMatrix, *pathPtr,
+ GrPathRenderer* pr = fDrawingManager->getContext()->getPathRenderer(viewMatrix, *pathPtr,
*strokeInfoPtr, false,
- type);
+ type, isStencilDisabled,
+ isStencilBufferMSAA);
GrStrokeInfo dashlessStrokeInfo(strokeInfo, false);
if (nullptr == pr && strokeInfo.isDashed()) {
@@ -707,9 +708,9 @@ void GrDrawContext::internalDrawPath(GrPipelineBuilder* pipelineBuilder,
return;
}
strokeInfoPtr = &dashlessStrokeInfo;
- pr = fDrawingManager->getContext()->getPathRenderer(*pipelineBuilder, viewMatrix,
- *pathPtr, *strokeInfoPtr,
- false, type);
+ pr = fDrawingManager->getContext()->getPathRenderer(viewMatrix, *pathPtr, *strokeInfoPtr,
+ false, type, isStencilDisabled,
+ isStencilBufferMSAA);
}
if (nullptr == pr) {
@@ -732,9 +733,9 @@ void GrDrawContext::internalDrawPath(GrPipelineBuilder* pipelineBuilder,
}
// This time, allow SW renderer
- pr = fDrawingManager->getContext()->getPathRenderer(*pipelineBuilder, viewMatrix,
- *pathPtr, *strokeInfoPtr,
- true, type);
+ pr = fDrawingManager->getContext()->getPathRenderer(viewMatrix, *pathPtr, *strokeInfoPtr,
+ true, type, isStencilDisabled,
+ isStencilBufferMSAA);
}
if (nullptr == pr) {
« include/gpu/GrContext.h ('K') | « src/gpu/GrContext.cpp ('k') | src/gpu/GrPathRenderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698