diff --git a/src/atlastext/SkAtlasTextTarget.cpp b/src/atlastext/SkAtlasTextTarget.cpp index 883b3f1e95..60507cf7cd 100644 --- a/src/atlastext/SkAtlasTextTarget.cpp +++ b/src/atlastext/SkAtlasTextTarget.cpp @@ -99,7 +99,7 @@ public: void addDrawOp(const GrClip&, std::unique_ptr op) override; void drawPath(const GrClip&, const SkPath&, const SkPaint&, const SkMatrix& viewMatrix, - const SkMatrix* pathMatrix, const SkIRect& clipBounds) override { + const SkMatrix* pathMatrix) override { SkDebugf("Path glyph??"); } @@ -159,14 +159,13 @@ void SkInternalAtlasTextTarget::drawText(const SkGlyphID glyphs[], const SkPoint SkSurfaceProps props(SkSurfaceProps::kUseDistanceFieldFonts_Flag, kUnknown_SkPixelGeometry); auto* grContext = this->context()->internal().grContext(); - auto bounds = SkIRect::MakeWH(fWidth, fHeight); auto atlasTextContext = grContext->contextPriv().drawingManager()->getTextContext(); SkGlyphRunBuilder builder; builder.drawGlyphPos(paint, SkSpan{glyphs, SkTo(glyphCnt)}, positions); auto glyphRunList = builder.useGlyphRunList(); if (!glyphRunList.empty()) { atlasTextContext->drawGlyphRunList(grContext, this, GrNoClip(), this->ctm(), props, - glyphRunList, bounds); + glyphRunList); } } diff --git a/src/core/SkGlyphRun.cpp b/src/core/SkGlyphRun.cpp index da5901ea4e..dce1faa442 100644 --- a/src/core/SkGlyphRun.cpp +++ b/src/core/SkGlyphRun.cpp @@ -864,8 +864,8 @@ GrColor generate_filtered_color(const SkPaint& paint, const GrColorSpaceInfo& co void GrTextContext::drawGlyphRunList( GrContext* context, GrTextTarget* target, const GrClip& clip, - const SkMatrix& viewMatrix, const SkSurfaceProps& props, const SkGlyphRunList& glyphRunList, - const SkIRect& clipBounds) { + const SkMatrix& viewMatrix, const SkSurfaceProps& props, + const SkGlyphRunList& glyphRunList) { SkPoint origin = glyphRunList.origin(); // Get the first paint to use as the key paint. @@ -951,7 +951,7 @@ void GrTextContext::drawGlyphRunList( } cacheBlob->flush(target, props, fDistanceAdjustTable.get(), listPaint, filteredColor, - clip, viewMatrix, clipBounds, origin.x(), origin.y()); + clip, viewMatrix, origin.x(), origin.y()); } static SkRect rect_to_draw( diff --git a/src/gpu/GrBlurUtils.cpp b/src/gpu/GrBlurUtils.cpp index c651c4848b..4a0f9fe6f2 100644 --- a/src/gpu/GrBlurUtils.cpp +++ b/src/gpu/GrBlurUtils.cpp @@ -271,7 +271,6 @@ void GrBlurUtils::drawPathWithMaskFilter(GrContext* context, const SkPaint& paint, const SkMatrix& origViewMatrix, const SkMatrix* prePathMatrix, - const SkIRect& clipBounds, bool pathIsMutable) { if (context->abandoned()) { return; diff --git a/src/gpu/GrBlurUtils.h b/src/gpu/GrBlurUtils.h index 6fd981ec4b..c15ca51d1d 100644 --- a/src/gpu/GrBlurUtils.h +++ b/src/gpu/GrBlurUtils.h @@ -38,7 +38,6 @@ namespace GrBlurUtils { const SkPaint& paint, const SkMatrix& origViewMatrix, const SkMatrix* prePathMatrix, - const SkIRect& clipBounds, bool pathIsMutable); /** diff --git a/src/gpu/GrRenderTargetContext.cpp b/src/gpu/GrRenderTargetContext.cpp index f0d8eba4de..69b092e2be 100644 --- a/src/gpu/GrRenderTargetContext.cpp +++ b/src/gpu/GrRenderTargetContext.cpp @@ -69,10 +69,9 @@ public: } void drawPath(const GrClip& clip, const SkPath& path, const SkPaint& paint, - const SkMatrix& viewMatrix, const SkMatrix* pathMatrix, - const SkIRect& clipBounds) override { + const SkMatrix& viewMatrix, const SkMatrix* pathMatrix) override { GrBlurUtils::drawPathWithMaskFilter(fRenderTargetContext->fContext, fRenderTargetContext, - clip, path, paint, viewMatrix, pathMatrix, clipBounds, + clip, path, paint, viewMatrix, pathMatrix, false); } @@ -235,7 +234,7 @@ GrOpList* GrRenderTargetContext::getOpList() { void GrRenderTargetContext::drawGlyphRunList( const GrClip& clip, const SkMatrix& viewMatrix, - const SkGlyphRunList& blob, const SkIRect& clipBounds) { + const SkGlyphRunList& blob) { ASSERT_SINGLE_OWNER RETURN_IF_ABANDONED SkDEBUGCODE(this->validate();) @@ -243,7 +242,7 @@ void GrRenderTargetContext::drawGlyphRunList( GrTextContext* atlasTextContext = this->drawingManager()->getTextContext(); atlasTextContext->drawGlyphRunList(fContext, fTextTarget.get(), clip, viewMatrix, - fSurfaceProps, blob, clipBounds); + fSurfaceProps, blob); } void GrRenderTargetContext::discard() { diff --git a/src/gpu/GrRenderTargetContext.h b/src/gpu/GrRenderTargetContext.h index d0cbe46173..b0756a0bf7 100644 --- a/src/gpu/GrRenderTargetContext.h +++ b/src/gpu/GrRenderTargetContext.h @@ -59,9 +59,7 @@ class SK_API GrRenderTargetContext : public GrSurfaceContext { public: ~GrRenderTargetContext() override; - virtual void drawGlyphRunList(const GrClip&, - const SkMatrix& viewMatrix, const SkGlyphRunList&, - const SkIRect& clipBounds); + virtual void drawGlyphRunList(const GrClip&, const SkMatrix& viewMatrix, const SkGlyphRunList&); /** * Provides a perfomance hint that the render target's contents are allowed diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp index 97d9a6551c..bce9275610 100644 --- a/src/gpu/SkGpuDevice.cpp +++ b/src/gpu/SkGpuDevice.cpp @@ -383,8 +383,7 @@ void SkGpuDevice::drawRect(const SkRect& rect, const SkPaint& paint) { path.setIsVolatile(true); path.addRect(rect); GrBlurUtils::drawPathWithMaskFilter(fContext.get(), fRenderTargetContext.get(), - this->clip(), path, paint, this->ctm(), nullptr, - this->devClipBounds(), true); + this->clip(), path, paint, this->ctm(), nullptr, true); return; } @@ -444,8 +443,7 @@ void SkGpuDevice::drawRRect(const SkRRect& rrect, const SkPaint& paint) { path.setIsVolatile(true); path.addRRect(rrect); GrBlurUtils::drawPathWithMaskFilter(fContext.get(), fRenderTargetContext.get(), - this->clip(), path, paint, this->ctm(), nullptr, - this->devClipBounds(), true); + this->clip(), path, paint, this->ctm(), nullptr, true); return; } @@ -489,8 +487,7 @@ void SkGpuDevice::drawDRRect(const SkRRect& outer, path.setFillType(SkPath::kEvenOdd_FillType); GrBlurUtils::drawPathWithMaskFilter(fContext.get(), fRenderTargetContext.get(), this->clip(), - path, paint, this->ctm(), nullptr, this->devClipBounds(), - true); + path, paint, this->ctm(), nullptr, true); } @@ -640,7 +637,7 @@ void SkGpuDevice::drawPath(const SkPath& origSrcPath, } GrBlurUtils::drawPathWithMaskFilter(fContext.get(), fRenderTargetContext.get(), this->clip(), origSrcPath, paint, this->ctm(), prePathMatrix, - this->devClipBounds(), pathIsMutable); + pathIsMutable); } static const int kBmpSmallTileSize = 1 << 10; @@ -1637,8 +1634,7 @@ void SkGpuDevice::drawGlyphRunList(const SkGlyphRunList& glyphRunList) { GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice", "drawGlyphRunList", fContext.get()); SkDEBUGCODE(this->validate();) - fRenderTargetContext->drawGlyphRunList( - this->clip(), this->ctm(), glyphRunList, this->devClipBounds()); + fRenderTargetContext->drawGlyphRunList(this->clip(), this->ctm(), glyphRunList); } /////////////////////////////////////////////////////////////////////////////// diff --git a/src/gpu/text/GrTextBlob.cpp b/src/gpu/text/GrTextBlob.cpp index bcec3f21d2..53b3b4d74f 100644 --- a/src/gpu/text/GrTextBlob.cpp +++ b/src/gpu/text/GrTextBlob.cpp @@ -276,8 +276,7 @@ static void calculate_translation(bool applyVM, void GrTextBlob::flush(GrTextTarget* target, const SkSurfaceProps& props, const GrDistanceFieldAdjustTable* distanceAdjustTable, const SkPaint& paint, GrColor filteredColor, const GrClip& clip, - const SkMatrix& viewMatrix, const SkIRect& clipBounds, - SkScalar x, SkScalar y) { + const SkMatrix& viewMatrix, SkScalar x, SkScalar y) { // GrTextBlob::makeOp only takes uint16_t values for run and subRun indices. // Encountering something larger than this is highly unlikely, so we'll just not draw it. @@ -300,7 +299,7 @@ void GrTextBlob::flush(GrTextTarget* target, const SkSurfaceProps& props, SkMatrix pathMatrix; pathMatrix.setScale(pathGlyph.fScale, pathGlyph.fScale); pathMatrix.postTranslate(pathGlyph.fX + transX, pathGlyph.fY + transY); - target->drawPath(clip, pathGlyph.fPath, runPaint, ctm, &pathMatrix, clipBounds); + target->drawPath(clip, pathGlyph.fPath, runPaint, ctm, &pathMatrix); } } diff --git a/src/gpu/text/GrTextBlob.h b/src/gpu/text/GrTextBlob.h index 71ddf743fc..6fa9d04cb0 100644 --- a/src/gpu/text/GrTextBlob.h +++ b/src/gpu/text/GrTextBlob.h @@ -202,8 +202,7 @@ public: void flush(GrTextTarget*, const SkSurfaceProps& props, const GrDistanceFieldAdjustTable* distanceAdjustTable, const SkPaint& paint, GrColor filteredColor, const GrClip& clip, - const SkMatrix& viewMatrix, const SkIRect& clipBounds, SkScalar x, - SkScalar y); + const SkMatrix& viewMatrix, SkScalar x, SkScalar y); void computeSubRunBounds(SkRect* outBounds, int runIndex, int subRunIndex, const SkMatrix& viewMatrix, SkScalar x, SkScalar y, diff --git a/src/gpu/text/GrTextContext.h b/src/gpu/text/GrTextContext.h index 1c72608743..27bb1a1727 100644 --- a/src/gpu/text/GrTextContext.h +++ b/src/gpu/text/GrTextContext.h @@ -45,8 +45,7 @@ public: static std::unique_ptr Make(const Options& options); void drawGlyphRunList(GrContext*, GrTextTarget*, const GrClip&, - const SkMatrix& viewMatrix, const SkSurfaceProps&, const SkGlyphRunList&, - const SkIRect& clipBounds); + const SkMatrix& viewMatrix, const SkSurfaceProps&, const SkGlyphRunList&); std::unique_ptr createOp_TestingOnly(GrContext*, GrTextContext*, diff --git a/src/gpu/text/GrTextTarget.h b/src/gpu/text/GrTextTarget.h index f5a7efa49d..3bcbe9a29c 100644 --- a/src/gpu/text/GrTextTarget.h +++ b/src/gpu/text/GrTextTarget.h @@ -31,8 +31,7 @@ public: virtual void addDrawOp(const GrClip&, std::unique_ptr op) = 0; virtual void drawPath(const GrClip&, const SkPath&, const SkPaint&, - const SkMatrix& viewMatrix, const SkMatrix* pathMatrix, - const SkIRect& clipBounds) = 0; + const SkMatrix& viewMatrix, const SkMatrix* pathMatrix) = 0; virtual void makeGrPaint(GrMaskFormat, const SkPaint&, const SkMatrix& viewMatrix, GrPaint*) = 0;