Init EGL only for HW-accelerated Activities
Most processes might end up using EGL, but most don't except for Activities with HW-accelerated UI. And for other cases, the startup latency of initializing EGL on-demand isn't as important. So this change only tries to early-initialize EGL for HWUI Activities. It also fixes a logic problem that may or not have been an actual bug: previously, we only chose a graphics driver if we successfully set up shader cache directories, even though these are mostly unrelated. Now we always choose a graphics driver, except in isolated processes that can't use graphics. Bug: 38215658 Test: systrace framework start and Clock launch, check eglGetDisplay is called by RenderThread in non-HWUI-Activity cases, and is called on a separate thread before RenderThread needs it for HWUI-Activity cases. Change-Id: I101e5578a9d7c508d232d0edeed7ceff9d8a74d6
Loading
Please register or sign in to comment