aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/core/SkGlyphCache.cpp11
-rw-r--r--src/core/SkGlyphCache.h20
2 files changed, 1 insertions, 30 deletions
diff --git a/src/core/SkGlyphCache.cpp b/src/core/SkGlyphCache.cpp
index 99afad3dd2..4332419bbb 100644
--- a/src/core/SkGlyphCache.cpp
+++ b/src/core/SkGlyphCache.cpp
@@ -522,10 +522,6 @@ SkExclusiveStrikePtr SkGlyphCache::FindOrCreateStrikeExclusive(
return FindOrCreateStrikeExclusive(*desc, effects, *tf);
}
-void SkGlyphCache::AttachCache(SkGlyphCache* cache) {
- SkGlyphCache_Globals::AttachCache(cache);
-}
-
void SkGlyphCache::ForEachStrike(std::function<void(const SkGlyphCache&)> visitor) {
SkGlyphCache_Globals& globals = get_globals();
SkAutoExclusive ac(globals.fLock);
@@ -799,10 +795,3 @@ void SkGraphics::PurgeFontCache() {
SkTypefaceCache::PurgeAll();
}
-SkGlyphCache* SkGlyphCache::DetachCache(
- SkTypeface* typeface, const SkScalerContextEffects& effects, const SkDescriptor* desc)
-{
- auto cache = FindOrCreateStrikeExclusive(*desc, effects, *typeface);
- return cache.release();
-}
-
diff --git a/src/core/SkGlyphCache.h b/src/core/SkGlyphCache.h
index 9b83c2377f..8feed326ef 100644
--- a/src/core/SkGlyphCache.h
+++ b/src/core/SkGlyphCache.h
@@ -32,7 +32,7 @@ using SkExclusiveStrikePtr = std::unique_ptr<
it and then adding it to the strike.
The strikes are held in a global list, available to all threads. To interact with one, call
- either Find*() or (Deprecated)DetachCache().
+ either Find{OrCreate}Exclusive().
The Find*Exclusive() method returns SkExclusiveStrikePtr, which releases exclusive ownership
when they go out of scope.
@@ -123,13 +123,6 @@ public:
SkScalerContext* getScalerContext() const { return fScalerContext.get(); }
-
- /** Given a strike that was returned by DetachCache() add it back into
- the global cache list (after which the caller should not reference it anymore.
- DEPRECATED - Use Find* and rely on RAII.
- */
- static void AttachCache(SkGlyphCache*);
-
static SkExclusiveStrikePtr FindStrikeExclusive(const SkDescriptor& desc);
template <typename ScalerContextCreator>
@@ -173,17 +166,6 @@ public:
return SkExclusiveStrikePtr(new SkGlyphCache(desc, std::move(context)));
}
- /** Detach a strike from the global cache matching the specified descriptor. Once detached,
- it can be queried/modified by the current thread, and when finished, be reattached to the
- global cache with AttachCache(). While detached, if another request is made with the same
- descriptor, a different strike will be generated. This is fine. It does mean we can have
- more than 1 strike for the same descriptor, but that will eventually get purged, and the
- win is that different thread will never block each other while a strike is being used.
- DEPRECATED
- */
- static SkGlyphCache* DetachCache(
- SkTypeface* typeface, const SkScalerContextEffects& effects, const SkDescriptor* desc);
-
static void Dump();
/** Dump memory usage statistics of all the attaches caches in the process using the