aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/text
diff options
context:
space:
mode:
authorGravatar borenet <borenet@google.com>2016-04-11 10:25:28 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-04-11 10:25:28 -0700
commit25e0a0416e5b37c1e0bef1934dc67ff62e442916 (patch)
tree3d172fdc83424f6abc7214979bb05793f5a2c6b0 /src/gpu/text
parent29feef80de0af74eb24b703d6675aea1bc17e655 (diff)
Revert of Pass effects directly to fontcache (patchset #8 id:140001 of https://codereview.chromium.org/1863013003/ )
Reason for revert: Seems to have broken the DEPS roll. Original issue's description: > Pass effects directly to fontcache > > BUG=skia:5176 > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1863013003 > > Committed: https://skia.googlesource.com/skia/+/c79172857c3f69cc46837e1beeae0c1ead377bb2 TBR=djsollen@google.com,bungeman@google.com,mtklein@google.com,fmalita@chromium.org,msarett@google.com,reed@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:5176 Review URL: https://codereview.chromium.org/1872253004
Diffstat (limited to 'src/gpu/text')
-rw-r--r--src/gpu/text/GrAtlasTextBlob.cpp4
-rw-r--r--src/gpu/text/GrAtlasTextBlob.h1
-rw-r--r--src/gpu/text/GrAtlasTextBlob_regenInBatch.cpp2
-rw-r--r--src/gpu/text/GrStencilAndCoverTextContext.cpp5
-rw-r--r--src/gpu/text/GrTextUtils.cpp6
5 files changed, 6 insertions, 12 deletions
diff --git a/src/gpu/text/GrAtlasTextBlob.cpp b/src/gpu/text/GrAtlasTextBlob.cpp
index afbff46994..4b339d4adb 100644
--- a/src/gpu/text/GrAtlasTextBlob.cpp
+++ b/src/gpu/text/GrAtlasTextBlob.cpp
@@ -59,9 +59,9 @@ SkGlyphCache* GrAtlasTextBlob::setupCache(int runIndex,
// if we have an override descriptor for the run, then we should use that
SkAutoDescriptor* desc = run->fOverrideDescriptor.get() ? run->fOverrideDescriptor.get() :
&run->fDescriptor;
- skPaint.getScalerContextDescriptor(&run->fEffects, desc, props, scalerContextFlags, viewMatrix);
+ skPaint.getScalerContextDescriptor(desc, props, scalerContextFlags, viewMatrix);
run->fTypeface.reset(SkSafeRef(skPaint.getTypeface()));
- return SkGlyphCache::DetachCache(run->fTypeface, run->fEffects, desc->getDesc());
+ return SkGlyphCache::DetachCache(run->fTypeface, desc->getDesc());
}
void GrAtlasTextBlob::appendGlyph(int runIndex,
diff --git a/src/gpu/text/GrAtlasTextBlob.h b/src/gpu/text/GrAtlasTextBlob.h
index bc1e0b4afc..36e45abcff 100644
--- a/src/gpu/text/GrAtlasTextBlob.h
+++ b/src/gpu/text/GrAtlasTextBlob.h
@@ -474,7 +474,6 @@ private:
SkAutoTUnref<SkTypeface> fTypeface;
SkSTArray<kMinSubRuns, SubRunInfo> fSubRunInfo;
SkAutoDescriptor fDescriptor;
- SkScalerContextEffects fEffects;
// Distance field text cannot draw coloremoji, and so has to fall back. However,
// though the distance field text and the coloremoji may share the same run, they
diff --git a/src/gpu/text/GrAtlasTextBlob_regenInBatch.cpp b/src/gpu/text/GrAtlasTextBlob_regenInBatch.cpp
index 7c3cf68524..7283e6d516 100644
--- a/src/gpu/text/GrAtlasTextBlob_regenInBatch.cpp
+++ b/src/gpu/text/GrAtlasTextBlob_regenInBatch.cpp
@@ -165,7 +165,7 @@ void GrAtlasTextBlob::regenInBatch(GrDrawBatch::Target* target,
SkGlyphCache::AttachCache(*cache);
}
*desc = newDesc;
- *cache = SkGlyphCache::DetachCache(run->fTypeface, run->fEffects, *desc);
+ *cache = SkGlyphCache::DetachCache(run->fTypeface, *desc);
*scaler = GrTextUtils::GetGrFontScaler(*cache);
*typeface = run->fTypeface;
}
diff --git a/src/gpu/text/GrStencilAndCoverTextContext.cpp b/src/gpu/text/GrStencilAndCoverTextContext.cpp
index a8dc20215a..f0c66979d5 100644
--- a/src/gpu/text/GrStencilAndCoverTextContext.cpp
+++ b/src/gpu/text/GrStencilAndCoverTextContext.cpp
@@ -539,13 +539,10 @@ GrPathRange* GrStencilAndCoverTextContext::TextRun::createGlyphs(GrContext* ctx)
ctx->resourceProvider()->findAndRefResourceByUniqueKey(fGlyphPathsKey));
if (nullptr == glyphs) {
if (fUsingRawGlyphPaths) {
- SkScalerContextEffects noeffects;
- glyphs = ctx->resourceProvider()->createGlyphs(fFont.getTypeface(), noeffects,
- nullptr, fStroke);
+ glyphs = ctx->resourceProvider()->createGlyphs(fFont.getTypeface(), nullptr, fStroke);
} else {
SkGlyphCache* cache = this->getGlyphCache();
glyphs = ctx->resourceProvider()->createGlyphs(cache->getScalerContext()->getTypeface(),
- cache->getScalerContext()->getEffects(),
&cache->getDescriptor(),
fStroke);
}
diff --git a/src/gpu/text/GrTextUtils.cpp b/src/gpu/text/GrTextUtils.cpp
index c368c214e1..3616bcada1 100644
--- a/src/gpu/text/GrTextUtils.cpp
+++ b/src/gpu/text/GrTextUtils.cpp
@@ -260,12 +260,10 @@ void GrTextUtils::DrawDFText(GrAtlasTextBlob* blob, int runIndex,
SkPaint::GlyphCacheProc glyphCacheProc = skPaint.getGlyphCacheProc(true);
SkAutoDescriptor desc;
- SkScalerContextEffects effects;
// We apply the fake-gamma by altering the distance in the shader, so we ignore the
// passed-in scaler context flags. (It's only used when we fall-back to bitmap text).
- skPaint.getScalerContextDescriptor(&effects, &desc, props, SkPaint::kNone_ScalerContextFlags,
- nullptr);
- SkGlyphCache* origPaintCache = SkGlyphCache::DetachCache(skPaint.getTypeface(), effects,
+ skPaint.getScalerContextDescriptor(&desc, props, SkPaint::kNone_ScalerContextFlags, nullptr);
+ SkGlyphCache* origPaintCache = SkGlyphCache::DetachCache(skPaint.getTypeface(),
desc.getDesc());
SkTArray<SkScalar> positions;