Revert of Retract PipelineBuilder some more (patchset #9 id:160001 of https://codereview.chromium.org/2092893003/ )
Reason for revert:
skbug.com/5559
Original issue's description:
> Retract PipelineBuilder some more
>
> The main part of this CL is widening SkDrawContext::drawBatch's API to accept the userStencilSettings & drawFace
>
> There is some ancillary spookiness related to expanding the should_apply_coverage_aa & mustUseHWAA methods to encompass mixedSamples
>
> Calved off:
> https://codereview.chromium.org/2165283002/ (Remove DrawFace enum from GrPipelineBuilder)
> https://codereview.chromium.org/2167183002/ (Minor change to Ganesh path renderers)
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2092893003
>
> Committed: https://skia.googlesource.com/skia/+/2895eeb11a9f0d9c0018d49dd4bc45f6c6fc062c
TBR=robertphillips@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review-Url: https://codereview.chromium.org/2175573004
diff --git a/src/gpu/text/GrAtlasTextBlob.cpp b/src/gpu/text/GrAtlasTextBlob.cpp
index 0bea086..12f35a3 100644
--- a/src/gpu/text/GrAtlasTextBlob.cpp
+++ b/src/gpu/text/GrAtlasTextBlob.cpp
@@ -10,6 +10,7 @@
#include "GrBlurUtils.h"
#include "GrContext.h"
#include "GrDrawContext.h"
+#include "GrPipelineBuilder.h"
#include "GrTextUtils.h"
#include "SkColorFilter.h"
#include "SkDrawFilter.h"
@@ -323,7 +324,9 @@
distanceAdjustTable, dc->isGammaCorrect(),
cache));
- dc->drawBatch(grPaint, clip, GrUserStencilSettings::kUnused, batch);
+ GrPipelineBuilder pipelineBuilder(grPaint, dc->mustUseHWAA(grPaint));
+
+ dc->drawBatch(pipelineBuilder, clip, batch);
}
}
diff --git a/src/gpu/text/GrStencilAndCoverTextContext.cpp b/src/gpu/text/GrStencilAndCoverTextContext.cpp
index 4d77b0e..ebf735a 100644
--- a/src/gpu/text/GrStencilAndCoverTextContext.cpp
+++ b/src/gpu/text/GrStencilAndCoverTextContext.cpp
@@ -11,6 +11,7 @@
#include "GrDrawContext.h"
#include "GrPath.h"
#include "GrPathRange.h"
+#include "GrPipelineBuilder.h"
#include "GrResourceProvider.h"
#include "GrTextUtils.h"
#include "SkAutoKern.h"
@@ -642,8 +643,11 @@
GrPathRendering::kWinding_FillType, glyphs, fInstanceData,
bounds));
- SkASSERT(drawContext->mustUseHWAA(grPaint) == grPaint.isAntiAlias());
- drawContext->drawBatch(grPaint, clip, kCoverPass, batch);
+ GrPipelineBuilder pipelineBuilder(grPaint);
+ pipelineBuilder.setState(GrPipelineBuilder::kHWAntialias_Flag, grPaint.isAntiAlias());
+ pipelineBuilder.setUserStencil(&kCoverPass);
+
+ drawContext->drawBatch(pipelineBuilder, clip, batch);
}
if (fFallbackTextBlob) {