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

Commit e44d5e5c authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Enable Skia shader cache"

parents 514a7403 e75ef1fb
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -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>
@@ -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) {
@@ -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) {