drm_hwcomposer: lazily generate shaders for GLWorkerCompositor
This still generates the first shader at GLWorkerCompositor::Init() to check
for shader generation errors. It's the only time that shader compilation errors
will be shown on the log.
This change shortens GL initialization time from 2.8 seconds to about 450
milliseconds. Besides improving boot time by 2.3 seconds, less fence timeouts
should happen at boot time due to HWC blocking.
TEST=run and see no display glitches or glworker related errors in logs
BUG=chrome-os-partner:46739
Change-Id: Ia264e3f73a0ebe8558165ae3c215777ef6339ecc
diff --git a/glworker.h b/glworker.h
index 3201739..222cf6f 100644
--- a/glworker.h
+++ b/glworker.h
@@ -68,6 +68,8 @@
CachedFramebuffer *PrepareAndCacheFramebuffer(
const sp<GraphicBuffer> &framebuffer);
+ GLint PrepareAndCacheProgram(unsigned texture_count);
+
EGLDisplay egl_display_;
EGLContext egl_ctx_;