aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2018-01-19 19:09:32 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-01-21 18:24:11 +0000
commit8ad91a9bf896d728b905124847d74787aac698a7 (patch)
tree4a5ac4b68bb0a5f5b5d6e6447ffb02b5173b912b /src/gpu
parent07853659fae395877fd5e09e92ae3b690ba3c222 (diff)
remove unused SkRasterizer
Bug: skia:7500 Change-Id: Iaa683cf8f0b18887cce4ec676631d1e1efee1712 Reviewed-on: https://skia-review.googlesource.com/97400 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'src/gpu')
-rw-r--r--src/gpu/text/GrAtlasTextBlob.cpp1
-rw-r--r--src/gpu/text/GrAtlasTextBlob.h2
-rw-r--r--src/gpu/text/GrAtlasTextBlobVertexRegenerator.cpp1
-rw-r--r--src/gpu/text/GrAtlasTextContext.cpp5
-rw-r--r--src/gpu/text/GrStencilAndCoverTextContext.cpp3
-rw-r--r--src/gpu/text/GrTextUtils.cpp2
6 files changed, 3 insertions, 11 deletions
diff --git a/src/gpu/text/GrAtlasTextBlob.cpp b/src/gpu/text/GrAtlasTextBlob.cpp
index df848db6f7..ca671b4500 100644
--- a/src/gpu/text/GrAtlasTextBlob.cpp
+++ b/src/gpu/text/GrAtlasTextBlob.cpp
@@ -61,7 +61,6 @@ SkGlyphCache* GrAtlasTextBlob::setupCache(int runIndex,
skPaint.getScalerContextDescriptor(&effects, desc, props, scalerContextFlags, viewMatrix);
run->fTypeface.reset(SkSafeRef(skPaint.getTypeface()));
run->fPathEffect = sk_ref_sp(effects.fPathEffect);
- run->fRasterizer = sk_ref_sp(effects.fRasterizer);
run->fMaskFilter = sk_ref_sp(effects.fMaskFilter);
return SkGlyphCache::DetachCache(run->fTypeface.get(), effects, desc->getDesc());
}
diff --git a/src/gpu/text/GrAtlasTextBlob.h b/src/gpu/text/GrAtlasTextBlob.h
index b93632fcfe..7106f11bf8 100644
--- a/src/gpu/text/GrAtlasTextBlob.h
+++ b/src/gpu/text/GrAtlasTextBlob.h
@@ -18,7 +18,6 @@
#include "SkOpts.h"
#include "SkPathEffect.h"
#include "SkPoint3.h"
-#include "SkRasterizer.h"
#include "SkRectPriv.h"
#include "SkSurfaceProps.h"
#include "SkTInternalLList.h"
@@ -489,7 +488,6 @@ private:
// Effects from the paint that are used to build a SkScalerContext.
sk_sp<SkPathEffect> fPathEffect;
- sk_sp<SkRasterizer> fRasterizer;
sk_sp<SkMaskFilter> fMaskFilter;
// Distance field text cannot draw coloremoji, and so has to fall back. However,
diff --git a/src/gpu/text/GrAtlasTextBlobVertexRegenerator.cpp b/src/gpu/text/GrAtlasTextBlobVertexRegenerator.cpp
index a49a3ff998..1ae2c79fd4 100644
--- a/src/gpu/text/GrAtlasTextBlobVertexRegenerator.cpp
+++ b/src/gpu/text/GrAtlasTextBlobVertexRegenerator.cpp
@@ -199,7 +199,6 @@ Regenerator::Result Regenerator::doRegen() {
if (!*fLazyCache || (*fLazyCache)->getDescriptor() != *desc) {
SkScalerContextEffects effects;
effects.fPathEffect = fRun->fPathEffect.get();
- effects.fRasterizer = fRun->fRasterizer.get();
effects.fMaskFilter = fRun->fMaskFilter.get();
fLazyCache->reset(SkGlyphCache::DetachCache(fRun->fTypeface.get(), effects, desc));
}
diff --git a/src/gpu/text/GrAtlasTextContext.cpp b/src/gpu/text/GrAtlasTextContext.cpp
index bdbc600cc1..3578154fcc 100644
--- a/src/gpu/text/GrAtlasTextContext.cpp
+++ b/src/gpu/text/GrAtlasTextContext.cpp
@@ -494,9 +494,8 @@ bool GrAtlasTextContext::canDrawAsDistanceFields(const SkPaint& skPaint, const S
}
}
- // rasterizers and mask filters modify alpha, which doesn't
- // translate well to distance
- if (skPaint.getRasterizer() || skPaint.getMaskFilter() || !caps.shaderDerivativeSupport()) {
+ // mask filters modify alpha, which doesn't translate well to distance
+ if (skPaint.getMaskFilter() || !caps.shaderDerivativeSupport()) {
return false;
}
diff --git a/src/gpu/text/GrStencilAndCoverTextContext.cpp b/src/gpu/text/GrStencilAndCoverTextContext.cpp
index b2dfa6c375..fd467fcea5 100644
--- a/src/gpu/text/GrStencilAndCoverTextContext.cpp
+++ b/src/gpu/text/GrStencilAndCoverTextContext.cpp
@@ -53,9 +53,6 @@ GrStencilAndCoverTextContext::~GrStencilAndCoverTextContext() {
}
bool GrStencilAndCoverTextContext::internalCanDraw(const SkPaint& skPaint) {
- if (skPaint.getRasterizer()) {
- return false;
- }
if (skPaint.getMaskFilter()) {
return false;
}
diff --git a/src/gpu/text/GrTextUtils.cpp b/src/gpu/text/GrTextUtils.cpp
index 20a3a5c52c..47585f7fcf 100644
--- a/src/gpu/text/GrTextUtils.cpp
+++ b/src/gpu/text/GrTextUtils.cpp
@@ -74,7 +74,7 @@ uint32_t GrTextUtils::FilterTextFlags(const SkSurfaceProps& surfaceProps, const
}
bool GrTextUtils::ShouldDisableLCD(const SkPaint& paint) {
- return paint.getMaskFilter() || paint.getRasterizer() || paint.getPathEffect() ||
+ return paint.getMaskFilter() || paint.getPathEffect() ||
paint.isFakeBoldText() || paint.getStyle() != SkPaint::kFill_Style;
}