Generate the SurfaceFlinger shader cache on initialization
Blobcache is not yet enabled for surfaceflinger (as it should be).
As a temporary workaround, generate all needed shaders during
surfaceflinger initialization instead of doing the compilation
on-demand during ui transitions.
Change-Id: I14455b20a3f85f177d85c9c8b76d8ccc35379b39
diff --git a/services/surfaceflinger/RenderEngine/ProgramCache.h b/services/surfaceflinger/RenderEngine/ProgramCache.h
index e8b9dcd..1fa53d3 100644
--- a/services/surfaceflinger/RenderEngine/ProgramCache.h
+++ b/services/surfaceflinger/RenderEngine/ProgramCache.h
@@ -112,6 +112,8 @@
void useProgram(const Description& description);
private:
+ // Generate shaders to populate the cache
+ void primeCache();
// compute a cache Key from a Description
static Key computeKey(const Description& description);
// generates a program from the Key