diff options
Diffstat (limited to 'libs/hwui/renderthread/CacheManager.cpp')
| -rw-r--r-- | libs/hwui/renderthread/CacheManager.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libs/hwui/renderthread/CacheManager.cpp b/libs/hwui/renderthread/CacheManager.cpp index bec80b1e6011..82bfc4943526 100644 --- a/libs/hwui/renderthread/CacheManager.cpp +++ b/libs/hwui/renderthread/CacheManager.cpp @@ -50,7 +50,6 @@ CacheManager::CacheManager(const DisplayInfo& display) : mMaxSurfaceArea(display mVectorDrawableAtlas = new skiapipeline::VectorDrawableAtlas( mMaxSurfaceArea / 2, skiapipeline::VectorDrawableAtlas::StorageMode::disallowSharedSurface); - skiapipeline::ShaderCache::get().initShaderDiskCache(); } void CacheManager::reset(sk_sp<GrContext> context) { @@ -103,7 +102,7 @@ public: } }; -void CacheManager::configureContext(GrContextOptions* contextOptions) { +void CacheManager::configureContext(GrContextOptions* contextOptions, const void* identity, ssize_t size) { contextOptions->fAllowPathMaskCaching = true; float screenMP = mMaxSurfaceArea / 1024.0f / 1024.0f; @@ -133,7 +132,9 @@ void CacheManager::configureContext(GrContextOptions* contextOptions) { contextOptions->fExecutor = mTaskProcessor.get(); } - contextOptions->fPersistentCache = &skiapipeline::ShaderCache::get(); + auto& cache = skiapipeline::ShaderCache::get(); + cache.initShaderDiskCache(identity, size); + contextOptions->fPersistentCache = &cache; contextOptions->fGpuPathRenderers &= ~GpuPathRenderers::kCoverageCounting; } |
