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

Unified Diff: src/gpu/GrDrawContext.cpp

Issue 2175573004: Revert of Retract PipelineBuilder some more (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 5 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 | « include/gpu/GrDrawContext.h ('k') | src/gpu/GrSWMaskHelper.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « include/gpu/GrDrawContext.h ('k') | src/gpu/GrSWMaskHelper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698