Index: src/gpu/GrDrawContext.cpp |
diff --git a/src/gpu/GrDrawContext.cpp b/src/gpu/GrDrawContext.cpp |
index 52f7fc0a35e21ab45c581da0a943db0665b4f9e2..40d976869bd8c11d136ae6611729af0dc34bb0de 100644 |
--- a/src/gpu/GrDrawContext.cpp |
+++ b/src/gpu/GrDrawContext.cpp |
@@ -297,9 +297,9 @@ |
return false; |
} else { |
if (useHWAA) { |
- *useHWAA = rt->isUnifiedMultisampled() || rt->hasMixedSamples(); |
- } |
- return !rt->isUnifiedMultisampled() && !rt->hasMixedSamples(); |
+ *useHWAA = rt->isUnifiedMultisampled(); |
+ } |
+ return !rt->isUnifiedMultisampled(); |
} |
} |
@@ -621,8 +621,8 @@ |
batch.reset(ir->recordRect(croppedRect, viewMatrix, paint.getColor(), croppedLocalRect, |
paint.isAntiAlias(), fInstancedPipelineInfo, &useHWAA)); |
if (batch) { |
- SkASSERT(useHWAA == this->mustUseHWAA(paint)); |
- this->drawBatch(paint, clip, GrUserStencilSettings::kUnused, batch); |
+ GrPipelineBuilder pipelineBuilder(paint, useHWAA); |
+ this->getDrawTarget()->drawBatch(pipelineBuilder, this, clip, batch); |
return; |
} |
} |
@@ -632,13 +632,15 @@ |
batch.reset(GrAAFillRectBatch::CreateWithLocalRect(paint.getColor(), viewMatrix, |
croppedRect, croppedLocalRect)); |
if (batch) { |
- SkASSERT(useHWAA == this->mustUseHWAA(paint)); |
- this->drawBatch(paint, clip, GrUserStencilSettings::kUnused, batch); |
+ GrPipelineBuilder pipelineBuilder(paint, useHWAA); |
+ this->drawBatch(pipelineBuilder, clip, batch); |
+ return; |
} |
} else { |
this->drawNonAAFilledRect(clip, paint, viewMatrix, croppedRect, &croppedLocalRect, |
nullptr, nullptr); |
} |
+ |
} |
void GrDrawContext::fillRectWithLocalMatrix(const GrClip& clip, |
@@ -1238,19 +1240,12 @@ |
pr->drawPath(args); |
} |
-void GrDrawContext::drawBatch(const GrPaint& paint, |
- const GrClip& clip, |
- const GrUserStencilSettings& userStencilSettings, |
- GrDrawBatch* batch, |
- GrDrawFace drawFace) { |
+void GrDrawContext::drawBatch(const GrPipelineBuilder& pipelineBuilder, const GrClip& clip, |
+ GrDrawBatch* batch) { |
ASSERT_SINGLE_OWNER |
RETURN_IF_ABANDONED |
SkDEBUGCODE(this->validate();) |
GR_AUDIT_TRAIL_AUTO_FRAME(fAuditTrail, "GrDrawContext::drawBatch"); |
- GrPipelineBuilder pipelineBuilder(paint, this->mustUseHWAA(paint)); |
- pipelineBuilder.setUserStencil(&userStencilSettings); |
- pipelineBuilder.setDrawFace(drawFace); |
- |
this->getDrawTarget()->drawBatch(pipelineBuilder, this, clip, batch); |
} |