diff options
author | Mike Reed <reed@google.com> | 2018-01-23 15:29:32 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-01-23 21:14:20 +0000 |
commit | 80747ef591ff3c09c2b610eb21258132d1ff4ef5 (patch) | |
tree | e7472d73f966f9400b0e52cb02ad9e8515de32c3 /src/gpu/text | |
parent | a7701e032bcc55a73360aa8d1b53ceef566de991 (diff) |
move the guts of SkMaskFilter.h into SkMaskFilterBase.h
Bug: skia:
Change-Id: I29ad0960156562867429542d3cfbf3d639529cab
Reviewed-on: https://skia-review.googlesource.com/98802
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/text')
-rw-r--r-- | src/gpu/text/GrAtlasTextBlob.cpp | 3 | ||||
-rw-r--r-- | src/gpu/text/GrAtlasTextBlob.h | 8 | ||||
-rw-r--r-- | src/gpu/text/GrAtlasTextContext.cpp | 5 | ||||
-rw-r--r-- | src/gpu/text/GrTextBlobCache.h | 2 |
4 files changed, 10 insertions, 8 deletions
diff --git a/src/gpu/text/GrAtlasTextBlob.cpp b/src/gpu/text/GrAtlasTextBlob.cpp index 69e5e775be..7fce4ba856 100644 --- a/src/gpu/text/GrAtlasTextBlob.cpp +++ b/src/gpu/text/GrAtlasTextBlob.cpp @@ -13,6 +13,7 @@ #include "SkColorFilter.h" #include "SkDrawFilter.h" #include "SkGlyphCache.h" +#include "SkMaskFilterBase.h" #include "SkTextBlobRunIterator.h" #include "ops/GrAtlasTextOp.h" @@ -152,7 +153,7 @@ void GrAtlasTextBlob::appendBigGlyph(GrGlyph* glyph, SkGlyphCache* cache, const } bool GrAtlasTextBlob::mustRegenerate(const GrTextUtils::Paint& paint, - const SkMaskFilter::BlurRec& blurRec, + const SkMaskFilterBase::BlurRec& blurRec, const SkMatrix& viewMatrix, SkScalar x, SkScalar y) { // If we have LCD text then our canonical color will be set to transparent, in this case we have // to regenerate the blob on any color change diff --git a/src/gpu/text/GrAtlasTextBlob.h b/src/gpu/text/GrAtlasTextBlob.h index 94ec54a775..12a80c49d3 100644 --- a/src/gpu/text/GrAtlasTextBlob.h +++ b/src/gpu/text/GrAtlasTextBlob.h @@ -14,7 +14,7 @@ #include "GrMemoryPool.h" #include "GrTextUtils.h" #include "SkDescriptor.h" -#include "SkMaskFilter.h" +#include "SkMaskFilterBase.h" #include "SkOpts.h" #include "SkPathEffect.h" #include "SkPoint3.h" @@ -81,7 +81,7 @@ public: }; void setupKey(const GrAtlasTextBlob::Key& key, - const SkMaskFilter::BlurRec& blurRec, + const SkMaskFilterBase::BlurRec& blurRec, const SkPaint& paint) { fKey = key; if (key.fHasBlur) { @@ -190,7 +190,7 @@ public: } } - bool mustRegenerate(const GrTextUtils::Paint&, const SkMaskFilter::BlurRec& blurRec, + bool mustRegenerate(const GrTextUtils::Paint&, const SkMaskFilterBase::BlurRec& blurRec, const SkMatrix& viewMatrix, SkScalar x, SkScalar y); // flush a GrAtlasTextBlob associated with a SkTextBlob @@ -536,7 +536,7 @@ private: GrGlyph** fGlyphs; Run* fRuns; GrMemoryPool* fPool; - SkMaskFilter::BlurRec fBlurRec; + SkMaskFilterBase::BlurRec fBlurRec; StrokeInfo fStrokeInfo; SkTArray<BigGlyph> fBigGlyphs; Key fKey; diff --git a/src/gpu/text/GrAtlasTextContext.cpp b/src/gpu/text/GrAtlasTextContext.cpp index 4193c7d32c..41c46466ac 100644 --- a/src/gpu/text/GrAtlasTextContext.cpp +++ b/src/gpu/text/GrAtlasTextContext.cpp @@ -15,6 +15,7 @@ #include "SkGr.h" #include "SkGraphics.h" #include "SkMakeUnique.h" +#include "SkMaskFilterBase.h" #include "ops/GrMeshDrawOp.h" // DF sizes and thresholds for usage of the small and medium sizes. For example, above @@ -113,13 +114,13 @@ void GrAtlasTextContext::drawTextBlob(GrContext* context, GrTextUtils::Target* t } sk_sp<GrAtlasTextBlob> cacheBlob; - SkMaskFilter::BlurRec blurRec; + SkMaskFilterBase::BlurRec blurRec; GrAtlasTextBlob::Key key; // 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 && !mf->asABlur(&blurRec)) || + (mf && !as_MFB(mf)->asABlur(&blurRec)) || drawFilter); SkScalerContextFlags scalerContextFlags = ComputeScalerContextFlags(target->colorSpaceInfo()); diff --git a/src/gpu/text/GrTextBlobCache.h b/src/gpu/text/GrTextBlobCache.h index ac15124937..7a5c3a8c28 100644 --- a/src/gpu/text/GrTextBlobCache.h +++ b/src/gpu/text/GrTextBlobCache.h @@ -48,7 +48,7 @@ public: sk_sp<GrAtlasTextBlob> makeCachedBlob(const SkTextBlob* blob, const GrAtlasTextBlob::Key& key, - const SkMaskFilter::BlurRec& blurRec, + const SkMaskFilterBase::BlurRec& blurRec, const SkPaint& paint) { sk_sp<GrAtlasTextBlob> cacheBlob(this->makeBlob(blob)); cacheBlob->setupKey(key, blurRec, paint); |