aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--bench/PathTextBench.cpp2
-rw-r--r--bench/SkGlyphCacheBench.cpp2
-rw-r--r--samplecode/SamplePathText.cpp2
-rw-r--r--src/core/SkDraw.cpp6
-rw-r--r--src/core/SkGlyphCache.cpp33
-rw-r--r--src/core/SkGlyphCache.h22
-rw-r--r--src/core/SkOverdrawCanvas.cpp4
-rw-r--r--src/core/SkPaint.cpp16
-rw-r--r--src/core/SkRemoteGlyphCache.cpp4
-rw-r--r--src/core/SkStrikeCache.cpp34
-rw-r--r--src/core/SkStrikeCache.h19
-rw-r--r--src/gpu/text/GrAtlasTextBlob.cpp2
-rw-r--r--src/gpu/text/GrAtlasTextBlobVertexRegenerator.cpp2
-rw-r--r--src/gpu/text/GrAtlasTextContext.cpp4
-rw-r--r--src/pdf/SkPDFDevice.cpp2
-rw-r--r--src/pdf/SkPDFFont.cpp2
-rw-r--r--src/xps/SkXPSDevice.cpp6
17 files changed, 78 insertions, 84 deletions
diff --git a/bench/PathTextBench.cpp b/bench/PathTextBench.cpp
index 9379b9879f..38cc9e7732 100644
--- a/bench/PathTextBench.cpp
+++ b/bench/PathTextBench.cpp
@@ -46,7 +46,7 @@ private:
void onDelayedSetup() override {
SkPaint defaultPaint;
- auto cache = SkGlyphCache::FindOrCreateStrikeExclusive(defaultPaint);
+ auto cache = SkStrikeCache::FindOrCreateStrikeExclusive(defaultPaint);
for (int i = 0; i < kNumGlyphs; ++i) {
SkPackedGlyphID id(cache->unicharToGlyph(kGlyphs[i]));
sk_ignore_unused_variable(cache->getScalerContext()->getPath(id, &fGlyphs[i]));
diff --git a/bench/SkGlyphCacheBench.cpp b/bench/SkGlyphCacheBench.cpp
index 0333bfe38e..08d43e3eca 100644
--- a/bench/SkGlyphCacheBench.cpp
+++ b/bench/SkGlyphCacheBench.cpp
@@ -20,7 +20,7 @@
static void do_font_stuff(SkPaint* paint) {
for (SkScalar i = 8; i < 64; i++) {
paint->setTextSize(i);
- auto cache = SkGlyphCache::FindOrCreateStrikeExclusive(
+ auto cache = SkStrikeCache::FindOrCreateStrikeExclusive(
*paint, nullptr, SkScalerContextFlags::kNone, nullptr);
uint16_t glyphs['z'];
for (int c = ' '; c < 'z'; c++) {
diff --git a/samplecode/SamplePathText.cpp b/samplecode/SamplePathText.cpp
index 0d04b734b4..3dd3287a5f 100644
--- a/samplecode/SamplePathText.cpp
+++ b/samplecode/SamplePathText.cpp
@@ -24,7 +24,7 @@ public:
PathText() {
SkPaint defaultPaint;
- auto cache = SkGlyphCache::FindOrCreateStrikeExclusive(defaultPaint);
+ auto cache = SkStrikeCache::FindOrCreateStrikeExclusive(defaultPaint);
SkPath glyphPaths[52];
for (int i = 0; i < 52; ++i) {
// I and l are rects on OS X ...
diff --git a/src/core/SkDraw.cpp b/src/core/SkDraw.cpp
index f205080c25..71d0d13463 100644
--- a/src/core/SkDraw.cpp
+++ b/src/core/SkDraw.cpp
@@ -1543,7 +1543,7 @@ void SkDraw::drawText(const char text[], size_t byteLength, SkScalar x, SkScalar
return;
}
- auto cache = SkGlyphCache::FindOrCreateStrikeExclusive(
+ auto cache = SkStrikeCache::FindOrCreateStrikeExclusive(
paint, props, this->scalerContextFlags(), fMatrix);
// The Blitter Choose needs to be live while using the blitter below.
@@ -1575,7 +1575,7 @@ void SkDraw::drawPosText_asPaths(const char text[], size_t byteLength, const SkS
SkPaint::GlyphCacheProc glyphCacheProc = SkPaint::GetGlyphCacheProc(paint.getTextEncoding(),
paint.isDevKernText(),
true);
- auto cache = SkGlyphCache::FindOrCreateStrikeExclusive(
+ auto cache = SkStrikeCache::FindOrCreateStrikeExclusive(
paint, props, this->scalerContextFlags(), nullptr);
const char* stop = text + byteLength;
@@ -1623,7 +1623,7 @@ void SkDraw::drawPosText(const char text[], size_t byteLength, const SkScalar po
return;
}
- auto cache = SkGlyphCache::FindOrCreateStrikeExclusive(
+ auto cache = SkStrikeCache::FindOrCreateStrikeExclusive(
paint, props, this->scalerContextFlags(), fMatrix);
// The Blitter Choose needs to be live while using the blitter below.
diff --git a/src/core/SkGlyphCache.cpp b/src/core/SkGlyphCache.cpp
index 5327d1accb..3475b6037d 100644
--- a/src/core/SkGlyphCache.cpp
+++ b/src/core/SkGlyphCache.cpp
@@ -9,7 +9,6 @@
#include "SkGraphics.h"
#include "SkMutex.h"
#include "SkOnce.h"
-#include "SkPaintPriv.h"
#include "SkPath.h"
#include "SkTemplates.h"
#include "SkTypeface.h"
@@ -387,38 +386,6 @@ void SkGlyphCache::dump() const {
SkDebugf("%s\n", msg.c_str());
}
-SkExclusiveStrikePtr SkGlyphCache::FindStrikeExclusive(const SkDescriptor& desc) {
- return SkStrikeCache::FindStrikeExclusive(desc);
-}
-
-SkExclusiveStrikePtr SkGlyphCache::FindOrCreateStrikeExclusive(
- const SkDescriptor& desc, const SkScalerContextEffects& effects, const SkTypeface& typeface)
-{
- auto cache = SkGlyphCache::FindStrikeExclusive(desc);
- if (cache == nullptr) {
- auto scaler = SkStrikeCache::CreateScalerContext(desc, effects, typeface);
- cache = SkStrikeCache::CreateStrikeExclusive(desc, std::move(scaler));
- }
- return cache;
-}
-
-SkExclusiveStrikePtr SkGlyphCache::FindOrCreateStrikeExclusive(
- const SkPaint& paint,
- const SkSurfaceProps* surfaceProps,
- SkScalerContextFlags scalerContextFlags,
- const SkMatrix* deviceMatrix)
-{
- SkAutoDescriptor ad;
- SkScalerContextEffects effects;
-
- auto desc = SkScalerContext::CreateDescriptorAndEffectsUsingPaint(
- paint, surfaceProps, scalerContextFlags, deviceMatrix, &ad, &effects);
-
- auto tf = SkPaintPriv::GetTypefaceOrDefault(paint);
-
- return FindOrCreateStrikeExclusive(*desc, effects, *tf);
-}
-
#ifdef SK_DEBUG
void SkGlyphCache::validate() const {
diff --git a/src/core/SkGlyphCache.h b/src/core/SkGlyphCache.h
index ca6ae8fb09..8d5098a496 100644
--- a/src/core/SkGlyphCache.h
+++ b/src/core/SkGlyphCache.h
@@ -123,24 +123,6 @@ public:
SkScalerContext* getScalerContext() const { return fScalerContext.get(); }
- static SkExclusiveStrikePtr FindStrikeExclusive(const SkDescriptor& desc);
-
- static SkExclusiveStrikePtr FindOrCreateStrikeExclusive(
- const SkDescriptor& desc,
- const SkScalerContextEffects& effects,
- const SkTypeface& typeface);
-
- static SkExclusiveStrikePtr FindOrCreateStrikeExclusive(
- const SkPaint& paint,
- const SkSurfaceProps* surfaceProps,
- SkScalerContextFlags scalerContextFlags,
- const SkMatrix* deviceMatrix);
-
- static SkExclusiveStrikePtr FindOrCreateStrikeExclusive(const SkPaint& paint) {
- return FindOrCreateStrikeExclusive(
- paint, nullptr, SkScalerContextFlags::kFakeGammaAndBoostContrast, nullptr);
- }
-
#ifdef SK_DEBUG
void validate() const;
#else
@@ -244,11 +226,9 @@ public:
SkAutoGlyphCacheNoGamma(const SkPaint& paint,
const SkSurfaceProps* surfaceProps,
const SkMatrix* matrix)
- : INHERITED(SkGlyphCache::FindOrCreateStrikeExclusive(
+ : SkExclusiveStrikePtr(SkStrikeCache::FindOrCreateStrikeExclusive(
paint, surfaceProps, SkScalerContextFlags::kNone, matrix)) {}
-private:
- using INHERITED = SkExclusiveStrikePtr;
};
#define SkAutoGlyphCacheNoGamma(...) SK_REQUIRE_LOCAL_VAR(SkAutoGlyphCacheNoGamma)
#endif
diff --git a/src/core/SkOverdrawCanvas.cpp b/src/core/SkOverdrawCanvas.cpp
index eee7d83afb..118b9431e3 100644
--- a/src/core/SkOverdrawCanvas.cpp
+++ b/src/core/SkOverdrawCanvas.cpp
@@ -63,7 +63,7 @@ void SkOverdrawCanvas::onDrawText(const void* text, size_t byteLength, SkScalar
ProcessOneGlyphBounds processBounds(this);
SkSurfaceProps props(0, kUnknown_SkPixelGeometry);
this->getProps(&props);
- auto cache = SkGlyphCache::FindOrCreateStrikeExclusive(
+ auto cache = SkStrikeCache::FindOrCreateStrikeExclusive(
paint, &props, SkScalerContextFlags::kNone, &this->getTotalMatrix());
SkFindAndPlaceGlyph::ProcessText(paint.getTextEncoding(), (const char*) text, byteLength,
SkPoint::Make(x, y), SkMatrix(), paint.getTextAlign(),
@@ -76,7 +76,7 @@ void SkOverdrawCanvas::drawPosTextCommon(const void* text, size_t byteLength, co
ProcessOneGlyphBounds processBounds(this);
SkSurfaceProps props(0, kUnknown_SkPixelGeometry);
this->getProps(&props);
- auto cache = SkGlyphCache::FindOrCreateStrikeExclusive(
+ auto cache = SkStrikeCache::FindOrCreateStrikeExclusive(
paint, &props, SkScalerContextFlags::kNone, &this->getTotalMatrix());
SkFindAndPlaceGlyph::ProcessPosText(paint.getTextEncoding(), (const char*) text, byteLength,
SkPoint::Make(0, 0), SkMatrix(), (const SkScalar*) pos, 2,
diff --git a/src/core/SkPaint.cpp b/src/core/SkPaint.cpp
index 3dc0af66f1..141b60b252 100644
--- a/src/core/SkPaint.cpp
+++ b/src/core/SkPaint.cpp
@@ -430,7 +430,7 @@ int SkPaint::textToGlyphs(const void* textData, size_t byteLength, uint16_t glyp
return SkToInt(byteLength >> 1);
}
- auto cache = SkGlyphCache::FindOrCreateStrikeExclusive(*this);
+ auto cache = SkStrikeCache::FindOrCreateStrikeExclusive(*this);
const char* text = (const char*)textData;
const char* stop = text + byteLength;
@@ -487,7 +487,7 @@ bool SkPaint::containsText(const void* textData, size_t byteLength) const {
return true;
}
- auto cache = SkGlyphCache::FindOrCreateStrikeExclusive(*this);
+ auto cache = SkStrikeCache::FindOrCreateStrikeExclusive(*this);
switch (this->getTextEncoding()) {
case SkPaint::kUTF8_TextEncoding: {
@@ -536,7 +536,7 @@ void SkPaint::glyphsToUnichars(const uint16_t glyphs[], int count, SkUnichar tex
SkASSERT(textData != nullptr);
SkSurfaceProps props(0, kUnknown_SkPixelGeometry);
- auto cache = SkGlyphCache::FindOrCreateStrikeExclusive(
+ auto cache = SkStrikeCache::FindOrCreateStrikeExclusive(
*this, &props, SkScalerContextFlags::kFakeGammaAndBoostContrast, nullptr);
for (int index = 0; index < count; index++) {
@@ -801,7 +801,7 @@ SkScalar SkPaint::measureText(const void* textData, size_t length, SkRect* bound
const SkPaint& paint = canon.getPaint();
SkScalar scale = canon.getScale();
- auto cache = SkGlyphCache::FindOrCreateStrikeExclusive(paint);
+ auto cache = SkStrikeCache::FindOrCreateStrikeExclusive(paint);
SkScalar width = 0;
@@ -854,7 +854,7 @@ size_t SkPaint::breakText(const void* textD, size_t length, SkScalar maxWidth,
maxWidth /= scale;
}
- auto cache = SkGlyphCache::FindOrCreateStrikeExclusive(paint);
+ auto cache = SkStrikeCache::FindOrCreateStrikeExclusive(paint);
GlyphCacheProc glyphCacheProc = SkPaint::GetGlyphCacheProc(paint.getTextEncoding(),
paint.isDevKernText(),
@@ -924,7 +924,7 @@ SkScalar SkPaint::getFontMetrics(FontMetrics* metrics, SkScalar zoom) const {
{
auto typeface = SkPaintPriv::GetTypefaceOrDefault(paint);
- auto cache = SkGlyphCache::FindOrCreateStrikeExclusive(*desc, effects, *typeface);
+ auto cache = SkStrikeCache::FindOrCreateStrikeExclusive(*desc, effects, *typeface);
*metrics = cache->getFontMetrics();
}
@@ -959,7 +959,7 @@ int SkPaint::getTextWidths(const void* textData, size_t byteLength,
const SkPaint& paint = canon.getPaint();
SkScalar scale = canon.getScale();
- auto cache = SkGlyphCache::FindOrCreateStrikeExclusive(paint);
+ auto cache = SkStrikeCache::FindOrCreateStrikeExclusive(paint);
GlyphCacheProc glyphCacheProc = SkPaint::GetGlyphCacheProc(paint.getTextEncoding(),
paint.isDevKernText(),
nullptr != bounds);
@@ -1741,7 +1741,7 @@ SkTextBaseIter::SkTextBaseIter(const char text[], size_t length,
}
// SRGBTODO: Is this correct?
- fCache = SkGlyphCache::FindOrCreateStrikeExclusive(
+ fCache = SkStrikeCache::FindOrCreateStrikeExclusive(
fPaint, nullptr,
SkScalerContextFlags::kFakeGammaAndBoostContrast, nullptr);
diff --git a/src/core/SkRemoteGlyphCache.cpp b/src/core/SkRemoteGlyphCache.cpp
index 9252589461..d73622327f 100644
--- a/src/core/SkRemoteGlyphCache.cpp
+++ b/src/core/SkRemoteGlyphCache.cpp
@@ -326,7 +326,7 @@ void SkTextBlobCacheDiffCanvas::processGlyphRun(
auto typefaceID = SkTypefaceProxy::DownCast(runPaint.getTypeface())->remoteTypefaceID();
auto& diffs = fStrikeCacheDiff->findStrikeDifferences(*desc, typefaceID);
- auto cache = SkGlyphCache::FindStrikeExclusive(*desc);
+ auto cache = SkStrikeCache::FindStrikeExclusive(*desc);
bool isSubpixel = SkToBool(rec.fFlags & SkScalerContext::kSubpixelPositioning_Flag);
SkAxisAlignment axisAlignment = SkAxisAlignment::kNone_SkAxisAlignment;
if (it.positioning() == SkTextBlob::kHorizontal_Positioning) {
@@ -480,7 +480,7 @@ static void update_caches_from_strikes_data(SkStrikeClient *client,
// TODO: implement effects handling.
SkScalerContextEffects effects;
- auto strike = SkGlyphCache::FindStrikeExclusive(*desc);
+ auto strike = SkStrikeCache::FindStrikeExclusive(*desc);
if (strike == nullptr) {
auto scaler = SkStrikeCache::CreateScalerContext(*desc, effects, *tf);
strike = SkStrikeCache::CreateStrikeExclusive(*desc, std::move(scaler), fontMetrics);
diff --git a/src/core/SkStrikeCache.cpp b/src/core/SkStrikeCache.cpp
index 8d0b8326d3..f5ae5bce35 100644
--- a/src/core/SkStrikeCache.cpp
+++ b/src/core/SkStrikeCache.cpp
@@ -17,6 +17,7 @@
#include "SkTraceMemoryDump.h"
#include "SkTypeface.h"
#include "SkTypefaceCache.h"
+#include "SkPaintPriv.h"
// Returns the shared globals
static SkStrikeCache& get_globals() {
@@ -378,4 +379,37 @@ SkExclusiveStrikePtr SkStrikeCache::CreateStrikeExclusive(
}
return SkExclusiveStrikePtr(new SkGlyphCache(desc, move(scaler), fontMetrics));
+}
+
+SkExclusiveStrikePtr SkStrikeCache::FindOrCreateStrikeExclusive(
+ const SkDescriptor& desc, const SkScalerContextEffects& effects, const SkTypeface& typeface)
+{
+ auto cache = FindStrikeExclusive(desc);
+ if (cache == nullptr) {
+ auto scaler = CreateScalerContext(desc, effects, typeface);
+ cache = CreateStrikeExclusive(desc, move(scaler));
+ }
+ return cache;
+}
+
+SkExclusiveStrikePtr SkStrikeCache::FindOrCreateStrikeExclusive(
+ const SkPaint& paint,
+ const SkSurfaceProps* surfaceProps,
+ SkScalerContextFlags scalerContextFlags,
+ const SkMatrix* deviceMatrix)
+{
+ SkAutoDescriptor ad;
+ SkScalerContextEffects effects;
+
+ auto desc = SkScalerContext::CreateDescriptorAndEffectsUsingPaint(
+ paint, surfaceProps, scalerContextFlags, deviceMatrix, &ad, &effects);
+
+ auto tf = SkPaintPriv::GetTypefaceOrDefault(paint);
+
+ return FindOrCreateStrikeExclusive(*desc, effects, *tf);
+}
+
+SkExclusiveStrikePtr SkStrikeCache::FindOrCreateStrikeExclusive(const SkPaint& paint) {
+ return FindOrCreateStrikeExclusive(
+ paint, nullptr, kFakeGammaAndBoostContrast, nullptr);
} \ No newline at end of file
diff --git a/src/core/SkStrikeCache.h b/src/core/SkStrikeCache.h
index 078adfe9de..a72e71f232 100644
--- a/src/core/SkStrikeCache.h
+++ b/src/core/SkStrikeCache.h
@@ -46,14 +46,27 @@ public:
static ExclusiveStrikePtr FindStrikeExclusive(const SkDescriptor&);
- static std::unique_ptr<SkScalerContext> CreateScalerContext(
- const SkDescriptor&, const SkScalerContextEffects&, const SkTypeface&);
-
static ExclusiveStrikePtr CreateStrikeExclusive(
const SkDescriptor& desc,
std::unique_ptr<SkScalerContext> scaler,
SkPaint::FontMetrics* maybeMetrics = nullptr);
+ static ExclusiveStrikePtr FindOrCreateStrikeExclusive(
+ const SkDescriptor& desc,
+ const SkScalerContextEffects& effects,
+ const SkTypeface& typeface);
+
+ static ExclusiveStrikePtr FindOrCreateStrikeExclusive(
+ const SkPaint& paint,
+ const SkSurfaceProps* surfaceProps,
+ SkScalerContextFlags scalerContextFlags,
+ const SkMatrix* deviceMatrix);
+
+ static ExclusiveStrikePtr FindOrCreateStrikeExclusive(const SkPaint& paint);
+
+ static std::unique_ptr<SkScalerContext> CreateScalerContext(
+ const SkDescriptor&, const SkScalerContextEffects&, const SkTypeface&);
+
static void PurgeAll();
static void Dump();
diff --git a/src/gpu/text/GrAtlasTextBlob.cpp b/src/gpu/text/GrAtlasTextBlob.cpp
index 73c87215a9..611abf7830 100644
--- a/src/gpu/text/GrAtlasTextBlob.cpp
+++ b/src/gpu/text/GrAtlasTextBlob.cpp
@@ -71,7 +71,7 @@ SkExclusiveStrikePtr GrAtlasTextBlob::setupCache(int runIndex,
run->fTypeface = SkPaintPriv::RefTypefaceOrDefault(skPaint);
run->fPathEffect = sk_ref_sp(effects.fPathEffect);
run->fMaskFilter = sk_ref_sp(effects.fMaskFilter);
- return SkGlyphCache::FindOrCreateStrikeExclusive(*desc->getDesc(), effects, *run->fTypeface);
+ return SkStrikeCache::FindOrCreateStrikeExclusive(*desc->getDesc(), effects, *run->fTypeface);
}
void GrAtlasTextBlob::appendGlyph(int runIndex,
diff --git a/src/gpu/text/GrAtlasTextBlobVertexRegenerator.cpp b/src/gpu/text/GrAtlasTextBlobVertexRegenerator.cpp
index 92d6eb0a6c..e2d4fe13ad 100644
--- a/src/gpu/text/GrAtlasTextBlobVertexRegenerator.cpp
+++ b/src/gpu/text/GrAtlasTextBlobVertexRegenerator.cpp
@@ -245,7 +245,7 @@ bool Regenerator::doRegen(Regenerator::Result* result) {
effects.fPathEffect = fRun->fPathEffect.get();
effects.fMaskFilter = fRun->fMaskFilter.get();
*fLazyCache =
- SkGlyphCache::FindOrCreateStrikeExclusive(*desc, effects, *fRun->fTypeface);
+ SkStrikeCache::FindOrCreateStrikeExclusive(*desc, effects, *fRun->fTypeface);
}
if (regenGlyphs) {
diff --git a/src/gpu/text/GrAtlasTextContext.cpp b/src/gpu/text/GrAtlasTextContext.cpp
index b0f5405649..6be6b5b8c3 100644
--- a/src/gpu/text/GrAtlasTextContext.cpp
+++ b/src/gpu/text/GrAtlasTextContext.cpp
@@ -500,7 +500,7 @@ void GrAtlasTextContext::DrawBmpPosTextAsPaths(GrAtlasTextBlob* blob, int runInd
SkPaint::GlyphCacheProc glyphCacheProc = SkPaint::GetGlyphCacheProc(pathPaint.getTextEncoding(),
pathPaint.isDevKernText(),
true);
- auto cache = SkGlyphCache::FindOrCreateStrikeExclusive(
+ auto cache = SkStrikeCache::FindOrCreateStrikeExclusive(
pathPaint, &props, SkScalerContextFlags::kFakeGammaAndBoostContrast, nullptr);
const char* stop = text + byteLength;
@@ -703,7 +703,7 @@ void GrAtlasTextContext::drawDFText(GrAtlasTextBlob* blob, int runIndex,
{
auto origPaintCache =
- SkGlyphCache::FindOrCreateStrikeExclusive(*desc.getDesc(), effects, *typeface);
+ SkStrikeCache::FindOrCreateStrikeExclusive(*desc.getDesc(), effects, *typeface);
SkAutoKern autokern;
const char* stop = text + byteLength;
diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp
index 95864d9cb9..ff14c41fae 100644
--- a/src/pdf/SkPDFDevice.cpp
+++ b/src/pdf/SkPDFDevice.cpp
@@ -1368,7 +1368,7 @@ void SkPDFDevice::internalDrawText(
scaledGlyphCachePaint.setTextScaleX(paint.getTextScaleX());
scaledGlyphCachePaint.setTextSkewX(paint.getTextSkewX());
scaledGlyphCachePaint.setTypeface(sk_ref_sp(typeface));
- auto scaledGlyphCache = SkGlyphCache::FindOrCreateStrikeExclusive(scaledGlyphCachePaint);
+ auto scaledGlyphCache = SkStrikeCache::FindOrCreateStrikeExclusive(scaledGlyphCachePaint);
SkTHashMap<SkPDFCanon::BitmapGlyphKey, SkPDFCanon::BitmapGlyph>* map =
&this->getCanon()->fBitmapGlyphImages;
for (PositionedGlyph positionedGlyph : fMissingGlyphs) {
diff --git a/src/pdf/SkPDFFont.cpp b/src/pdf/SkPDFFont.cpp
index c9230f017b..11c4b5828b 100644
--- a/src/pdf/SkPDFFont.cpp
+++ b/src/pdf/SkPDFFont.cpp
@@ -38,7 +38,7 @@ SkExclusiveStrikePtr SkPDFFont::MakeVectorCache(SkTypeface* face, int* size) {
}
tmpPaint.setTextSize((SkScalar)unitsPerEm);
const SkSurfaceProps props(0, kUnknown_SkPixelGeometry);
- return SkGlyphCache::FindOrCreateStrikeExclusive(
+ return SkStrikeCache::FindOrCreateStrikeExclusive(
tmpPaint, &props, SkScalerContextFlags::kFakeGammaAndBoostContrast, nullptr);
}
diff --git a/src/xps/SkXPSDevice.cpp b/src/xps/SkXPSDevice.cpp
index 2cfb545d4c..856cafe158 100644
--- a/src/xps/SkXPSDevice.cpp
+++ b/src/xps/SkXPSDevice.cpp
@@ -1876,7 +1876,7 @@ HRESULT SkXPSDevice::CreateTypefaceUse(const SkPaint& paint,
newTypefaceUse.fontData = fontData;
newTypefaceUse.xpsFont = xpsFontResource.release();
auto glyphCache =
- SkGlyphCache::FindOrCreateStrikeExclusive(
+ SkStrikeCache::FindOrCreateStrikeExclusive(
paint, &this->surfaceProps(),
SkScalerContextFlags::kNone, nullptr);
unsigned int glyphCount = glyphCache->getGlyphCount();
@@ -2063,7 +2063,7 @@ void SkXPSDevice::drawText(const void* text, size_t byteLen,
HRV(CreateTypefaceUse(paint, &typeface));
auto cache =
- SkGlyphCache::FindOrCreateStrikeExclusive(
+ SkStrikeCache::FindOrCreateStrikeExclusive(
paint, &this->surfaceProps(),
SkScalerContextFlags::kNone, nullptr);
@@ -2121,7 +2121,7 @@ void SkXPSDevice::drawPosText(const void* text, size_t byteLen,
HRV(CreateTypefaceUse(paint, &typeface));
auto cache =
- SkGlyphCache::FindOrCreateStrikeExclusive(
+ SkStrikeCache::FindOrCreateStrikeExclusive(
paint, &this->surfaceProps(),
SkScalerContextFlags::kNone, nullptr);