From 8020a24a8cfb308385876adf53ab963eae6eb8c9 Mon Sep 17 00:00:00 2001 From: Herb Derby Date: Tue, 3 May 2022 09:01:35 -0400 Subject: [PATCH] Remove unused parameter from makeAtlasTextOp The SubRunOwner parameter was used exclusively for the *NoCache SubRun system. This system has been removed from the code. Change-Id: Ic3b4a1e4f49dcbd9b297e5011d2e96dd163a9acb Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536437 Reviewed-by: Robert Phillips Commit-Queue: Herb Derby --- src/gpu/ganesh/ops/AtlasTextOp.cpp | 6 +----- src/gpu/ganesh/text/GrTextBlob.cpp | 27 +++++++++------------------ src/gpu/ganesh/text/GrTextBlob.h | 3 +-- 3 files changed, 11 insertions(+), 25 deletions(-) diff --git a/src/gpu/ganesh/ops/AtlasTextOp.cpp b/src/gpu/ganesh/ops/AtlasTextOp.cpp index 0f5cca44bd..732110a8eb 100644 --- a/src/gpu/ganesh/ops/AtlasTextOp.cpp +++ b/src/gpu/ganesh/ops/AtlasTextOp.cpp @@ -485,7 +485,6 @@ GrGeometryProcessor* AtlasTextOp::setupDfProcessor(SkArenaAlloc* arena, #if GR_TEST_UTILS #include "src/gpu/ganesh/GrDrawOpTest.h" - GrOp::Owner AtlasTextOp::CreateOpTestingOnly(SurfaceDrawContext* sdc, const SkPaint& skPaint, const SkFont& font, @@ -519,16 +518,14 @@ GrOp::Owner AtlasTextOp::CreateOpTestingOnly(SurfaceDrawContext* sdc, GrOp::Owner op; std::tie(std::ignore, op) = subRun->makeAtlasTextOp( - nullptr, mtxProvider, glyphRunList.origin(), skPaint, sdc, nullptr); + nullptr, mtxProvider, glyphRunList.origin(), skPaint, sdc); return op; } - #endif } // namespace skgpu::v1 #if GR_TEST_UTILS - GR_DRAW_OP_TEST_DEFINE(AtlasTextOp) { SkMatrixProvider matrixProvider(GrTest::TestMatrixInvertible(random)); @@ -555,5 +552,4 @@ GR_DRAW_OP_TEST_DEFINE(AtlasTextOp) { return skgpu::v1::AtlasTextOp::CreateOpTestingOnly(sdc, skPaint, font, matrixProvider, text, xInt, yInt); } - #endif diff --git a/src/gpu/ganesh/text/GrTextBlob.cpp b/src/gpu/ganesh/text/GrTextBlob.cpp index 9e1f03311b..6ab41f82bd 100644 --- a/src/gpu/ganesh/text/GrTextBlob.cpp +++ b/src/gpu/ganesh/text/GrTextBlob.cpp @@ -1108,8 +1108,7 @@ public: const SkMatrixProvider& viewMatrix, SkPoint, const SkPaint&, - skgpu::v1::SurfaceDrawContext*, - GrAtlasSubRunOwner) const override; + skgpu::v1::SurfaceDrawContext*) const override; void testingOnly_packedGlyphIDToGlyph(GrStrikeCache *cache) const override; @@ -1292,8 +1291,7 @@ void DirectMaskSubRun::draw(SkCanvas*, SkPoint drawOrigin, const SkPaint& paint, skgpu::v1::SurfaceDrawContext* sdc) const { - auto[drawingClip, op] = this->makeAtlasTextOp( - clip, viewMatrix, drawOrigin, paint, sdc, nullptr); + auto[drawingClip, op] = this->makeAtlasTextOp(clip, viewMatrix, drawOrigin, paint, sdc); if (op != nullptr) { sdc->addDrawOp(drawingClip, std::move(op)); } @@ -1303,8 +1301,7 @@ std::tuple DirectMaskSubRun::makeAtlasTextOp(const G const SkMatrixProvider& viewMatrix, SkPoint drawOrigin, const SkPaint& paint, - skgpu::v1::SurfaceDrawContext* sdc, - GrAtlasSubRunOwner subRunOwner) const { + skgpu::v1::SurfaceDrawContext* sdc) const { SkASSERT(this->glyphCount() != 0); const SkMatrix& drawMatrix = viewMatrix.localToDevice(); const SkMatrix& positionMatrix = position_matrix(drawMatrix, drawOrigin); @@ -1542,8 +1539,7 @@ public: const SkMatrixProvider& viewMatrix, SkPoint drawOrigin, const SkPaint&, - skgpu::v1::SurfaceDrawContext*, - GrAtlasSubRunOwner) const override; + skgpu::v1::SurfaceDrawContext*) const override; int unflattenSize() const override; @@ -1632,8 +1628,7 @@ void TransformedMaskSubRun::draw(SkCanvas*, SkPoint drawOrigin, const SkPaint& paint, skgpu::v1::SurfaceDrawContext* sdc) const { - auto[drawingClip, op] = this->makeAtlasTextOp( - clip, viewMatrix, drawOrigin, paint, sdc, nullptr); + auto[drawingClip, op] = this->makeAtlasTextOp(clip, viewMatrix, drawOrigin, paint, sdc); if (op != nullptr) { sdc->addDrawOp(drawingClip, std::move(op)); } @@ -1644,8 +1639,7 @@ TransformedMaskSubRun::makeAtlasTextOp(const GrClip* clip, const SkMatrixProvider& viewMatrix, SkPoint drawOrigin, const SkPaint& paint, - skgpu::v1::SurfaceDrawContext* sdc, - GrAtlasSubRunOwner) const { + skgpu::v1::SurfaceDrawContext* sdc) const { SkASSERT(this->glyphCount() != 0); const SkMatrix& drawMatrix = viewMatrix.localToDevice(); @@ -1755,8 +1749,7 @@ public: const SkMatrixProvider& viewMatrix, SkPoint drawOrigin, const SkPaint&, - skgpu::v1::SurfaceDrawContext*, - GrAtlasSubRunOwner) const override; + skgpu::v1::SurfaceDrawContext*) const override; int unflattenSize() const override; @@ -1879,8 +1872,7 @@ void SDFTSubRun::draw(SkCanvas*, SkPoint drawOrigin, const SkPaint& paint, skgpu::v1::SurfaceDrawContext* sdc) const { - auto[drawingClip, op] = this->makeAtlasTextOp( - clip, viewMatrix, drawOrigin, paint, sdc, nullptr); + auto[drawingClip, op] = this->makeAtlasTextOp(clip, viewMatrix, drawOrigin, paint, sdc); if (op != nullptr) { sdc->addDrawOp(drawingClip, std::move(op)); } @@ -1919,8 +1911,7 @@ SDFTSubRun::makeAtlasTextOp(const GrClip* clip, const SkMatrixProvider& viewMatrix, SkPoint drawOrigin, const SkPaint& paint, - skgpu::v1::SurfaceDrawContext* sdc, - GrAtlasSubRunOwner) const { + skgpu::v1::SurfaceDrawContext* sdc) const { SkASSERT(this->glyphCount() != 0); const SkMatrix& drawMatrix = viewMatrix.localToDevice(); diff --git a/src/gpu/ganesh/text/GrTextBlob.h b/src/gpu/ganesh/text/GrTextBlob.h index 2d1dbf63c7..70f8e373fc 100644 --- a/src/gpu/ganesh/text/GrTextBlob.h +++ b/src/gpu/ganesh/text/GrTextBlob.h @@ -73,8 +73,7 @@ public: const SkMatrixProvider& viewMatrix, SkPoint drawOrigin, const SkPaint&, - skgpu::v1::SurfaceDrawContext*, - GrAtlasSubRunOwner subRun) const = 0; + skgpu::v1::SurfaceDrawContext*) const = 0; virtual void fillVertexData( void* vertexDst, int offset, int count,