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

Unified Diff: src/gpu/GrStencilAndCoverPathRenderer.cpp

Issue 1001503002: Implement support for mixed sampled render targets (Closed) Base URL: https://skia.googlesource.com/skia.git@mix1
Patch Set: Fixes and squash with 3rd commit Created 5 years, 9 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/GrStencilAndCoverPathRenderer.cpp
diff --git a/src/gpu/GrStencilAndCoverPathRenderer.cpp b/src/gpu/GrStencilAndCoverPathRenderer.cpp
index aed1743af22216864a2aa2382a2ea724cc0c82a9..1f9144908b4477e73248bb58914bb054ad843950 100644
--- a/src/gpu/GrStencilAndCoverPathRenderer.cpp
+++ b/src/gpu/GrStencilAndCoverPathRenderer.cpp
@@ -59,7 +59,8 @@ bool GrStencilAndCoverPathRenderer::canDrawPath(const GrDrawTarget* target,
const SkStrokeRec& stroke,
bool antiAlias) const {
return !stroke.isHairlineStyle() &&
- !antiAlias && // doesn't do per-path AA, relies on the target having MSAA
+ (!antiAlias || // doesn't do per-path AA, relies on the target having MSAA
+ pipelineBuilder->getRenderTarget()->isMultisampled(kStencil_GrSampleConfig)) &&
pipelineBuilder->getStencil().isDisabled();
}
@@ -101,7 +102,8 @@ bool GrStencilAndCoverPathRenderer::onDrawPath(GrDrawTarget* target,
const SkPath& path,
const SkStrokeRec& stroke,
bool antiAlias) {
- SkASSERT(!antiAlias);
+ SkASSERT(!antiAlias ||
+ pipelineBuilder->getRenderTarget()->isMultisampled(kStencil_GrSampleConfig));
SkASSERT(!stroke.isHairlineStyle());
SkASSERT(pipelineBuilder->getStencil().isDisabled());

Powered by Google App Engine
This is Rietveld 408576698