Remove SkDrawFilter.
Change-Id: I0204a9522e828c87bb7c6c20ae34ce51161442af
Reviewed-on: https://skia-review.googlesource.com/137895
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
diff --git a/src/gpu/text/GrTextContext.cpp b/src/gpu/text/GrTextContext.cpp
index 16f164c..28204eb 100644
--- a/src/gpu/text/GrTextContext.cpp
+++ b/src/gpu/text/GrTextContext.cpp
@@ -14,7 +14,6 @@
#include "GrTextBlobCache.h"
#include "SkDistanceFieldGen.h"
#include "SkDraw.h"
-#include "SkDrawFilter.h"
#include "SkDrawProcs.h"
#include "SkFindAndPlaceGlyph.h"
#include "SkGlyphRun.h"
@@ -102,7 +101,7 @@
const GrClip& clip, const SkPaint& skPaint,
const SkMatrix& viewMatrix, const SkSurfaceProps& props,
const SkTextBlob* blob, SkScalar x, SkScalar y,
- SkDrawFilter* drawFilter, const SkIRect& clipBounds) {
+ const SkIRect& clipBounds) {
// If we have been abandoned, then don't draw
if (context->abandoned()) {
return;
@@ -114,9 +113,7 @@
// It might be worth caching these things, but its not clear at this time
// TODO for animated mask filters, this will fill up our cache. We need a safeguard here
const SkMaskFilter* mf = skPaint.getMaskFilter();
- bool canCache = !(skPaint.getPathEffect() ||
- (mf && !as_MFB(mf)->asABlur(&blurRec)) ||
- drawFilter);
+ bool canCache = !(skPaint.getPathEffect() || (mf && !as_MFB(mf)->asABlur(&blurRec)));
SkScalerContextFlags scalerContextFlags = ComputeScalerContextFlags(target->colorSpaceInfo());
auto glyphCache = context->contextPriv().getGlyphCache();
@@ -154,7 +151,7 @@
cacheBlob = textBlobCache->makeCachedBlob(blob, key, blurRec, skPaint);
this->regenerateTextBlob(cacheBlob.get(), glyphCache,
*context->contextPriv().caps()->shaderCaps(), paint,
- scalerContextFlags, viewMatrix, props, blob, x, y, drawFilter);
+ scalerContextFlags, viewMatrix, props, blob, x, y);
} else {
textBlobCache->makeMRU(cacheBlob.get());
@@ -166,7 +163,7 @@
sanityBlob->setupKey(key, blurRec, skPaint);
this->regenerateTextBlob(
sanityBlob.get(), glyphCache, *context->contextPriv().caps()->shaderCaps(),
- paint, scalerContextFlags, viewMatrix, props, blob, x, y, drawFilter);
+ paint, scalerContextFlags, viewMatrix, props, blob, x, y);
GrTextBlob::AssertEqual(*sanityBlob, *cacheBlob);
}
}
@@ -178,7 +175,7 @@
}
this->regenerateTextBlob(cacheBlob.get(), glyphCache,
*context->contextPriv().caps()->shaderCaps(), paint,
- scalerContextFlags, viewMatrix, props, blob, x, y, drawFilter);
+ scalerContextFlags, viewMatrix, props, blob, x, y);
}
cacheBlob->flush(target, props, fDistanceAdjustTable.get(), paint,
@@ -192,13 +189,12 @@
SkScalerContextFlags scalerContextFlags,
const SkMatrix& viewMatrix,
const SkSurfaceProps& props, const SkTextBlob* blob,
- SkScalar x, SkScalar y,
- SkDrawFilter* drawFilter) const {
+ SkScalar x, SkScalar y) const {
cacheBlob->initReusableBlob(paint.luminanceColor(), viewMatrix, x, y);
// Regenerate textblob
SkTextBlobRunIterator it(blob);
- GrTextUtils::RunPaint runPaint(&paint, drawFilter);
+ GrTextUtils::RunPaint runPaint(&paint);
for (int run = 0; !it.done(); it.next(), run++) {
int glyphCount = it.glyphCount();
size_t textLen = glyphCount * sizeof(uint16_t);