Commit 32e48c41 authored by Khushal's avatar Khushal Committed by Commit Bot

gpu: Enable SKSL -> GLSL disk caching.

We currently disable using GrContextOptions::PersistentCache if program
binary caching needs to be disabled for a workaround. Since skia can now
be configured to enable caching the SKSL -> GLSL conversion while
disabling program binary caching, allow the persistent cache to be used
for that.

R=ericrk@chromium.org

Bug: 924572
Change-Id: Iad1f60ae7c59809e20b3a5c9c54afd54aa825c63
Reviewed-on: https://chromium-review.googlesource.com/c/1476061
Auto-Submit: Khushal <khushalsagar@chromium.org>
Commit-Queue: Eric Karl <ericrk@chromium.org>
Reviewed-by: default avatarEric Karl <ericrk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#632839}
parent 292154b2
......@@ -111,6 +111,7 @@ void SharedContextState::InitializeGrContext(
options.fGlyphCacheTextureMaximumBytes = glyph_cache_max_texture_bytes_;
options.fPersistentCache = cache;
options.fAvoidStencilBuffers = workarounds.avoid_stencil_buffers;
options.fDisallowGLSLBinaryCaching = workarounds.disable_program_disk_cache;
owned_gr_context_ = GrContext::MakeGL(std::move(interface), options);
gr_context_ = owned_gr_context_.get();
if (!gr_context_) {
......
......@@ -97,8 +97,7 @@ GpuChannelManager::GpuChannelManager(
gpu::kGpuFeatureStatusEnabled) ||
features::IsUsingSkiaRenderer();
const bool disable_disk_cache =
gpu_preferences_.disable_gpu_shader_disk_cache ||
gpu_driver_bug_workarounds_.disable_program_disk_cache;
gpu_preferences_.disable_gpu_shader_disk_cache;
if (enable_gr_shader_cache && !disable_disk_cache)
gr_shader_cache_.emplace(gpu_preferences.gpu_program_cache_size, this);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment