Loading libs/hwui/renderthread/CacheManager.cpp +7 −0 Original line number Original line Diff line number Diff line Loading @@ -17,7 +17,9 @@ #include "CacheManager.h" #include "CacheManager.h" #include "Layer.h" #include "Layer.h" #include "Properties.h" #include "RenderThread.h" #include "RenderThread.h" #include "pipeline/skia/ShaderCache.h" #include "renderstate/RenderState.h" #include "renderstate/RenderState.h" #include <GrContextOptions.h> #include <GrContextOptions.h> Loading Loading @@ -46,6 +48,9 @@ CacheManager::CacheManager(const DisplayInfo& display) : mMaxSurfaceArea(display mVectorDrawableAtlas = new skiapipeline::VectorDrawableAtlas( mVectorDrawableAtlas = new skiapipeline::VectorDrawableAtlas( mMaxSurfaceArea / 2, mMaxSurfaceArea / 2, skiapipeline::VectorDrawableAtlas::StorageMode::disallowSharedSurface); skiapipeline::VectorDrawableAtlas::StorageMode::disallowSharedSurface); if (Properties::isSkiaEnabled()) { skiapipeline::ShaderCache::get().initShaderDiskCache(); } } } void CacheManager::reset(GrContext* context) { void CacheManager::reset(GrContext* context) { Loading Loading @@ -127,6 +132,8 @@ void CacheManager::configureContext(GrContextOptions* contextOptions) { } } contextOptions->fExecutor = mTaskProcessor.get(); contextOptions->fExecutor = mTaskProcessor.get(); } } contextOptions->fPersistentCache = &skiapipeline::ShaderCache::get(); } } void CacheManager::trimMemory(TrimMemoryMode mode) { void CacheManager::trimMemory(TrimMemoryMode mode) { Loading Loading
libs/hwui/renderthread/CacheManager.cpp +7 −0 Original line number Original line Diff line number Diff line Loading @@ -17,7 +17,9 @@ #include "CacheManager.h" #include "CacheManager.h" #include "Layer.h" #include "Layer.h" #include "Properties.h" #include "RenderThread.h" #include "RenderThread.h" #include "pipeline/skia/ShaderCache.h" #include "renderstate/RenderState.h" #include "renderstate/RenderState.h" #include <GrContextOptions.h> #include <GrContextOptions.h> Loading Loading @@ -46,6 +48,9 @@ CacheManager::CacheManager(const DisplayInfo& display) : mMaxSurfaceArea(display mVectorDrawableAtlas = new skiapipeline::VectorDrawableAtlas( mVectorDrawableAtlas = new skiapipeline::VectorDrawableAtlas( mMaxSurfaceArea / 2, mMaxSurfaceArea / 2, skiapipeline::VectorDrawableAtlas::StorageMode::disallowSharedSurface); skiapipeline::VectorDrawableAtlas::StorageMode::disallowSharedSurface); if (Properties::isSkiaEnabled()) { skiapipeline::ShaderCache::get().initShaderDiskCache(); } } } void CacheManager::reset(GrContext* context) { void CacheManager::reset(GrContext* context) { Loading Loading @@ -127,6 +132,8 @@ void CacheManager::configureContext(GrContextOptions* contextOptions) { } } contextOptions->fExecutor = mTaskProcessor.get(); contextOptions->fExecutor = mTaskProcessor.get(); } } contextOptions->fPersistentCache = &skiapipeline::ShaderCache::get(); } } void CacheManager::trimMemory(TrimMemoryMode mode) { void CacheManager::trimMemory(TrimMemoryMode mode) { Loading