Remove unused parameter from drawPathWithMaskFilter

Change-Id: If2a054c21f11127e61f9f552abb6fb1a395a740c
Reviewed-on: https://skia-review.googlesource.com/147105
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This commit is contained in:
Robert Phillips 2018-08-14 13:01:29 -04:00 committed by Skia Commit-Bot
parent d19fed1e29
commit e4643cc81c
11 changed files with 20 additions and 34 deletions

View File

@ -99,7 +99,7 @@ public:
void addDrawOp(const GrClip&, std::unique_ptr<GrAtlasTextOp> 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<const SkGlyphID>{glyphs, SkTo<size_t>(glyphCnt)}, positions);
auto glyphRunList = builder.useGlyphRunList();
if (!glyphRunList.empty()) {
atlasTextContext->drawGlyphRunList(grContext, this, GrNoClip(), this->ctm(), props,
glyphRunList, bounds);
glyphRunList);
}
}

View File

@ -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(

View File

@ -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;

View File

@ -38,7 +38,6 @@ namespace GrBlurUtils {
const SkPaint& paint,
const SkMatrix& origViewMatrix,
const SkMatrix* prePathMatrix,
const SkIRect& clipBounds,
bool pathIsMutable);
/**

View File

@ -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() {

View File

@ -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

View File

@ -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);
}
///////////////////////////////////////////////////////////////////////////////

View File

@ -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);
}
}

View File

@ -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,

View File

@ -45,8 +45,7 @@ public:
static std::unique_ptr<GrTextContext> 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<GrDrawOp> createOp_TestingOnly(GrContext*,
GrTextContext*,

View File

@ -31,8 +31,7 @@ public:
virtual void addDrawOp(const GrClip&, std::unique_ptr<GrAtlasTextOp> 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;