diff options
author | Stan Iliev <stani@google.com> | 2019-03-29 14:25:09 -0400 |
---|---|---|
committer | Stan Iliev <stani@google.com> | 2019-04-01 15:20:06 +0000 |
commit | 30b9096352de3c0c5aabbb47f5e6ccfff941ad2d (patch) | |
tree | 4a40d8474ee1c70127e286741ef51ea5633669aa /libs/hwui/renderthread/RenderThread.cpp | |
parent | dece92b28744012f6db87f5100b511cd459218a1 (diff) |
Don't load EGL driver always
EGL driver is preloaded only if HWUI renders with GL.
Test: Ran several apps, passed CtsGraphics and CtsUiRendering
Change-Id: Ib38d6f51a19a2ee3631c7d9c99283286c389e476
Diffstat (limited to 'libs/hwui/renderthread/RenderThread.cpp')
-rw-r--r-- | libs/hwui/renderthread/RenderThread.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/libs/hwui/renderthread/RenderThread.cpp b/libs/hwui/renderthread/RenderThread.cpp index 6cce31943d03..f55726902908 100644 --- a/libs/hwui/renderthread/RenderThread.cpp +++ b/libs/hwui/renderthread/RenderThread.cpp @@ -408,12 +408,13 @@ bool RenderThread::isCurrent() { } void RenderThread::preload() { - std::thread eglInitThread([]() { - //TODO: don't load EGL drivers for Vulkan, when HW bitmap uploader is refactored. - eglGetDisplay(EGL_DEFAULT_DISPLAY); - }); - eglInitThread.detach(); - if (Properties::getRenderPipelineType() == RenderPipelineType::SkiaVulkan) { + // EGL driver is always preloaded only if HWUI renders with GL. + if (Properties::getRenderPipelineType() == RenderPipelineType::SkiaGL) { + std::thread eglInitThread([]() { + eglGetDisplay(EGL_DEFAULT_DISPLAY); + }); + eglInitThread.detach(); + } else { requireVkContext(); } HardwareBitmapUploader::initialize(); |