Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e75ef1fb authored by Stan Iliev's avatar Stan Iliev
Browse files

Enable Skia shader cache

Enable Skia shader cache after fix for image and text drawing
issues were landed in Skia.

Test: Ran Hangouts, Settings, CNN, Drive, GMail, Calendar, Clock
Test: Maps, Docs, Play store, YouTube apps.
Change-Id: I94cd07e95b704bc164894aa8b8c63f49ded198f5
parent 5bce0de9
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -17,7 +17,9 @@
#include "CacheManager.h"

#include "Layer.h"
#include "Properties.h"
#include "RenderThread.h"
#include "pipeline/skia/ShaderCache.h"
#include "renderstate/RenderState.h"

#include <GrContextOptions.h>
@@ -46,6 +48,9 @@ CacheManager::CacheManager(const DisplayInfo& display) : mMaxSurfaceArea(display
    mVectorDrawableAtlas = new skiapipeline::VectorDrawableAtlas(
            mMaxSurfaceArea / 2,
            skiapipeline::VectorDrawableAtlas::StorageMode::disallowSharedSurface);
    if (Properties::isSkiaEnabled()) {
        skiapipeline::ShaderCache::get().initShaderDiskCache();
    }
}

void CacheManager::reset(GrContext* context) {
@@ -127,6 +132,8 @@ void CacheManager::configureContext(GrContextOptions* contextOptions) {
        }
        contextOptions->fExecutor = mTaskProcessor.get();
    }

    contextOptions->fPersistentCache = &skiapipeline::ShaderCache::get();
}

void CacheManager::trimMemory(TrimMemoryMode mode) {