From 3e36ce6e660ad585c58c5cc5591f23a46fcab767 Mon Sep 17 00:00:00 2001 From: Herb Derby Date: Wed, 20 Jun 2018 14:43:23 -0400 Subject: Make SkRemoteGlyphCache tests use private glyph cache Change-Id: If6aa189f3badc7558ab8ecf71ee3d704b275b20f Reviewed-on: https://skia-review.googlesource.com/136225 Commit-Queue: Herb Derby Reviewed-by: Mike Klein --- src/core/SkRemoteGlyphCache.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/core/SkRemoteGlyphCache.h') diff --git a/src/core/SkRemoteGlyphCache.h b/src/core/SkRemoteGlyphCache.h index ac13920772..f09228fd1e 100644 --- a/src/core/SkRemoteGlyphCache.h +++ b/src/core/SkRemoteGlyphCache.h @@ -20,7 +20,6 @@ #include "SkMakeUnique.h" #include "SkNoDrawCanvas.h" #include "SkRefCnt.h" -#include "SkRemoteGlyphCache.h" #include "SkSerialProcs.h" #include "SkTypeface.h" @@ -30,6 +29,7 @@ class SkGlyphCache; struct SkPackedGlyphID; enum SkScalerContextFlags : uint32_t; class SkScalerContextRecDescriptor; +class SkStrikeCache; class SkTextBlobRunIterator; class SkTypefaceProxy; struct WireTypeface; @@ -212,7 +212,9 @@ public: virtual void notifyCacheMiss(CacheMissType) {} }; - SkStrikeClient(sk_sp, bool isLogging = true); + SkStrikeClient(sk_sp, + bool isLogging = true, + SkStrikeCache* strikeCache = nullptr); ~SkStrikeClient(); // Deserializes the typeface previously serialized using the SkStrikeServer. Returns null if the @@ -223,7 +225,9 @@ public: // from a server when serializing the ops must be deserialized before the op // is rasterized. // Returns false if the data is invalid. - bool readStrikeData(const volatile void* memory, size_t memorySize); + bool readStrikeData( + const volatile void* memory, + size_t memorySize); private: class DiscardableStrikePinner; @@ -232,6 +236,7 @@ private: SkTHashMap> fRemoteFontIdToTypeface; sk_sp fDiscardableHandleManager; + SkStrikeCache* const fStrikeCache; const bool fIsLogging; }; -- cgit v1.2.3