Revert of Rework GrPipelineInfo (patchset #7 id:120001 of https://codereview.chromium.org/1213383005/)
Reason for revert:
breaking stuff!
Original issue's description:
> Makes GrPipelineInfo a class with query functions used by GrBatch subclasses.
>
> Committed: https://skia.googlesource.com/skia/+/f5179a4c490bc787190321bd8ffdb0e6a4efa9ac
TBR=joshualitt@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/1213013003
diff --git a/src/gpu/GrTessellatingPathRenderer.cpp b/src/gpu/GrTessellatingPathRenderer.cpp
index de5dcab..a41a88e 100644
--- a/src/gpu/GrTessellatingPathRenderer.cpp
+++ b/src/gpu/GrTessellatingPathRenderer.cpp
@@ -1375,10 +1375,11 @@
void initBatchTracker(const GrPipelineInfo& init) override {
// Handle any color overrides
- if (!init.readsColor()) {
+ if (init.fColorIgnored) {
fColor = GrColor_ILLEGAL;
+ } else if (GrColor_ILLEGAL != init.fOverrideColor) {
+ fColor = init.fOverrideColor;
}
- init.getOverrideColorIfSet(&fColor);
fPipelineInfo = init;
}
@@ -1411,8 +1412,8 @@
LOG("got %d pts, %d contours\n", maxPts, contourCnt);
uint32_t flags = GrDefaultGeoProcFactory::kPosition_GPType;
SkAutoTUnref<const GrGeometryProcessor> gp(
- GrDefaultGeoProcFactory::Create(flags, fColor, fPipelineInfo.readsLocalCoords(),
- !fPipelineInfo.readsCoverage(), fViewMatrix,
+ GrDefaultGeoProcFactory::Create(flags, fColor, fPipelineInfo.fUsesLocalCoords,
+ fPipelineInfo.fCoverageIgnored, fViewMatrix,
SkMatrix::I()));
batchTarget->initDraw(gp, pipeline);