Add option to use a program binary cache in DM, etc
Change-Id: I2117e41388962682a40f9db9ffc62150b30c7847 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221779 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
This commit is contained in:
parent
064729e439
commit
f0095cf86a
@ -8,6 +8,7 @@
|
||||
#include "include/core/SkExecutor.h"
|
||||
#include "include/gpu/GrContextOptions.h"
|
||||
#include "tools/flags/CommonFlags.h"
|
||||
#include "tools/gpu/MemoryCache.h"
|
||||
|
||||
|
||||
DEFINE_int(gpuThreads,
|
||||
@ -33,6 +34,7 @@ static DEFINE_bool(disableDriverCorrectnessWorkarounds, false,
|
||||
static DEFINE_bool(reduceOpListSplitting, false, "Improve opList sorting");
|
||||
static DEFINE_bool(dontReduceOpListSplitting, false, "Allow more opList splitting");
|
||||
|
||||
static DEFINE_bool(programBinaryCache, false, "Use in-memory program binary cache");
|
||||
|
||||
static GpuPathRenderers get_named_pathrenderers_flags(const char* name) {
|
||||
if (!strcmp(name, "none")) {
|
||||
@ -92,6 +94,11 @@ void SetCtxOptionsFromCommonFlags(GrContextOptions* ctxOptions) {
|
||||
ctxOptions->fGpuPathRenderers = collect_gpu_path_renderers_from_flags();
|
||||
ctxOptions->fDisableDriverCorrectnessWorkarounds = FLAGS_disableDriverCorrectnessWorkarounds;
|
||||
|
||||
if (FLAGS_programBinaryCache) {
|
||||
static sk_gpu_test::MemoryCache gMemoryCache;
|
||||
ctxOptions->fPersistentCache = &gMemoryCache;
|
||||
}
|
||||
|
||||
if (FLAGS_reduceOpListSplitting) {
|
||||
SkASSERT(!FLAGS_dontReduceOpListSplitting);
|
||||
ctxOptions->fReduceOpListSplitting = GrContextOptions::Enable::kYes;
|
||||
|
Loading…
Reference in New Issue
Block a user