Primes the shader cache before launching boot animation to avoid
janking when we eventually fall into GLES composition.
Bug:
30040263
Change-Id: I76ba66e92c5e6bb05930c325f384f3b774e91101
return config;
}
+
+void RenderEngine::primeCache() const {
+ // Getting the ProgramCache instance causes it to prime its shader cache,
+ // which is performed in its constructor
+ ProgramCache::getInstance();
+}
+
// ---------------------------------------------------------------------------
}; // namespace android
// ---------------------------------------------------------------------------
static EGLConfig chooseEglConfig(EGLDisplay display, int format);
+ void primeCache() const;
+
// dump the extension strings. always call the base class.
virtual void dump(String8& result);
// set initial conditions (e.g. unblank default device)
initializeDisplays();
+ mRenderEngine->primeCache();
+
// start boot animation
startBootAnim();
// set initial conditions (e.g. unblank default device)
initializeDisplays();
+ mRenderEngine->primeCache();
+
// start boot animation
startBootAnim();
}