Move pipeline handling out of GrMeshDrawOp.
The monolithic GrPipeline is moved to a subclass GrLegacyDrawMeshOp.
The pipeline used to record a GrMesh draw in a GrMeshDrawOp must now be passed rather than implicitly using the op's pipeline.
Change-Id: I50d77e4dcc8d91a523fa7566ce43a9a291174706
Reviewed-on: https://skia-review.googlesource.com/11002
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/text/GrAtlasTextBlob.cpp b/src/gpu/text/GrAtlasTextBlob.cpp
index 5427855..e8eeb0c 100644
--- a/src/gpu/text/GrAtlasTextBlob.cpp
+++ b/src/gpu/text/GrAtlasTextBlob.cpp
@@ -257,7 +257,7 @@
return false;
}
-inline std::unique_ptr<GrMeshDrawOp> GrAtlasTextBlob::makeOp(
+inline std::unique_ptr<GrLegacyMeshDrawOp> GrAtlasTextBlob::makeOp(
const Run::SubRunInfo& info, int glyphCount, int run, int subRun,
const SkMatrix& viewMatrix, SkScalar x, SkScalar y, const GrTextUtils::Paint& paint,
const SkSurfaceProps& props, const GrDistanceFieldAdjustTable* distanceAdjustTable,
@@ -305,12 +305,12 @@
continue;
}
- std::unique_ptr<GrMeshDrawOp> op(this->makeOp(info, glyphCount, run, subRun, viewMatrix, x,
- y, paint, props, distanceAdjustTable,
- rtc->isGammaCorrect(), cache));
+ std::unique_ptr<GrLegacyMeshDrawOp> op(
+ this->makeOp(info, glyphCount, run, subRun, viewMatrix, x, y, paint, props,
+ distanceAdjustTable, rtc->isGammaCorrect(), cache));
GrPipelineBuilder pipelineBuilder(std::move(grPaint), GrAAType::kNone);
- rtc->addMeshDrawOp(pipelineBuilder, clip, std::move(op));
+ rtc->addLegacyMeshDrawOp(pipelineBuilder, clip, std::move(op));
}
}
@@ -425,7 +425,7 @@
this->flushBigGlyphs(context, rtc, clip, paint, viewMatrix, x, y, clipBounds);
}
-std::unique_ptr<GrMeshDrawOp> GrAtlasTextBlob::test_makeOp(
+std::unique_ptr<GrLegacyMeshDrawOp> GrAtlasTextBlob::test_makeOp(
int glyphCount, int run, int subRun, const SkMatrix& viewMatrix, SkScalar x, SkScalar y,
const GrTextUtils::Paint& paint, const SkSurfaceProps& props,
const GrDistanceFieldAdjustTable* distanceAdjustTable, GrAtlasGlyphCache* cache) {