Changeset View
Changeset View
Standalone View
Standalone View
www/firefox/files/patch-bug1511726
- This file was added.
Don't try to use shader disk cache if disabled | |||||
diff --git gfx/webrender_bindings/RenderThread.cpp gfx/webrender_bindings/RenderThread.cpp | |||||
index 1e60a900ff5a..92dc857b8390 100644 | |||||
--- gfx/webrender_bindings/RenderThread.cpp | |||||
+++ gfx/webrender_bindings/RenderThread.cpp | |||||
@@ -768,7 +768,9 @@ WebRenderProgramCache::WebRenderProgramCache(wr::WrThreadPool* aThreadPool) { | |||||
path.Append(gfx::gfxVars::ProfDirectory()); | |||||
} | |||||
mProgramCache = wr_program_cache_new(&path, aThreadPool); | |||||
- wr_try_load_shader_from_disk(mProgramCache); | |||||
+ if (gfxVars::UseWebRenderProgramBinaryDisk()) { | |||||
+ wr_try_load_shader_from_disk(mProgramCache); | |||||
+ } | |||||
} | |||||
WebRenderProgramCache::~WebRenderProgramCache() { | |||||
diff --git gfx/webrender_bindings/src/bindings.rs gfx/webrender_bindings/src/bindings.rs | |||||
index 56bebc2882a0..88f7a1827264 100644 | |||||
--- gfx/webrender_bindings/src/bindings.rs | |||||
+++ gfx/webrender_bindings/src/bindings.rs | |||||
@@ -914,9 +914,7 @@ pub unsafe extern "C" fn wr_program_cache_delete(program_cache: *mut WrProgramCa | |||||
#[no_mangle] | |||||
pub unsafe extern "C" fn wr_try_load_shader_from_disk(program_cache: *mut WrProgramCache) { | |||||
- if !program_cache.is_null() { | |||||
- (*program_cache).try_load_from_disk(); | |||||
- } | |||||
+ (*program_cache).try_load_from_disk(); | |||||
} | |||||
#[no_mangle] |