From 101d56359a5a5dc3b8a2a4149ac171e25eb0bec0 Mon Sep 17 00:00:00 2001 From: Khushal Date: Tue, 1 May 2018 10:49:04 -0700 Subject: fonts: Set up remote glyph caching to push fonts. Currently the SkStrikeClient is designed to pull fonts from the server on demand, and to pre-fetch a batched request by analyzing the ops using a SkTextBlobCacheDiffCanvas. This change modifies the design to support a push based model, where the server pushes fonts required by the client and sets up the requisite SkGlyphCaches on the client prior to rasterizing the ops. This model still relies on the SkTextBlobCacheDiffCanvas for analyzing the glyphs required for rasterizing an op. The glyph caches required for raster are locked and missing glyphs to be sent to the client are tracked by the SkStrikeServer. The embedder can serialize this font data at any point, but must ensure that this data is deserialized by the SkStrikeClient at the remote end, before rasterizing any ops analyzed prior to serialization. Any refs on the caches are released once the font data is serialized by the server. The locking of glyph caches relies on the embedder providing discardable handles. These handles can be created on the server and serialized to be sent to the client, and map to an instance of SkGlyphCache. This allows the server to control the lifetime of the caches on the client. Bug: skia:7515 Change-Id: Id39f346b47b60899778404bbd0429ee811d0e53b Reviewed-on: https://skia-review.googlesource.com/120283 Commit-Queue: Khusal Sagar Reviewed-by: Herb Derby --- gn/tests.gni | 1 + 1 file changed, 1 insertion(+) (limited to 'gn/tests.gni') diff --git a/gn/tests.gni b/gn/tests.gni index d18758c05e..ebf83bbd63 100644 --- a/gn/tests.gni +++ b/gn/tests.gni @@ -226,6 +226,7 @@ tests_sources = [ "$_tests/SkNxTest.cpp", "$_tests/SkPEGTest.cpp", "$_tests/SkRasterPipelineTest.cpp", + "$_tests/SkRemoteGlyphCacheTest.cpp", "$_tests/SkResourceCacheTest.cpp", "$_tests/SkSharedMutexTest.cpp", "$_tests/SkSLErrorTest.cpp", -- cgit v1.2.3