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

Unified Diff: src/gpu/GrClipMaskManager.cpp

Issue 1399223005: Don't abort analytic clipping if using MSAA until elements are examined (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix 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
« no previous file with comments | « src/gpu/GrClipMaskManager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrClipMaskManager.cpp
diff --git a/src/gpu/GrClipMaskManager.cpp b/src/gpu/GrClipMaskManager.cpp
index 4b464bb01469101d781811d9a3a4f1391d54db91..e0a85d184d9eff88225100a18e209c12fa291cf3 100644
--- a/src/gpu/GrClipMaskManager.cpp
+++ b/src/gpu/GrClipMaskManager.cpp
@@ -109,6 +109,7 @@ bool GrClipMaskManager::useSWOnlyPath(const GrPipelineBuilder& pipelineBuilder,
}
bool GrClipMaskManager::getAnalyticClipProcessor(const GrReducedClip::ElementList& elements,
+ bool abortIfAA,
SkVector& clipToRTOffset,
const SkRect* drawBounds,
const GrFragmentProcessor** resultFP) {
@@ -151,16 +152,20 @@ bool GrClipMaskManager::getAnalyticClipProcessor(const GrReducedClip::ElementLis
if (failed) {
break;
}
-
if (!skip) {
GrPrimitiveEdgeType edgeType;
if (iter.get()->isAA()) {
+ if (abortIfAA) {
+ failed = true;
+ break;
+ }
edgeType =
invert ? kInverseFillAA_GrProcessorEdgeType : kFillAA_GrProcessorEdgeType;
} else {
edgeType =
invert ? kInverseFillBW_GrProcessorEdgeType : kFillBW_GrProcessorEdgeType;
}
+
switch (iter.get()->getType()) {
case SkClipStack::Element::kPath_Type:
fps[fpCnt] = GrConvexPolyEffect::Create(edgeType, iter.get()->getPath(),
@@ -282,8 +287,9 @@ bool GrClipMaskManager::setupClipping(const GrPipelineBuilder& pipelineBuilder,
bool disallowAnalyticAA = pipelineBuilder.getRenderTarget()->isUnifiedMultisampled();
const GrFragmentProcessor* clipFP = nullptr;
if (elements.isEmpty() ||
- (requiresAA && !disallowAnalyticAA &&
- this->getAnalyticClipProcessor(elements, clipToRTOffset, devBounds, &clipFP))) {
+ (requiresAA &&
+ this->getAnalyticClipProcessor(elements, disallowAnalyticAA, clipToRTOffset, devBounds,
+ &clipFP))) {
SkIRect scissorSpaceIBounds(clipSpaceIBounds);
scissorSpaceIBounds.offset(-clip.origin());
if (nullptr == devBounds ||
« no previous file with comments | « src/gpu/GrClipMaskManager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698