summaryrefslogtreecommitdiff
path: root/libs/hwui/renderthread/RenderThread.cpp
diff options
context:
space:
mode:
authorDiego Wilson <diegowilson@google.com>2019-04-04 16:46:02 -0700
committerSteven Laver <lavers@google.com>2019-04-05 18:26:57 -0700
commit6e44ad255823e1b7f2b23386d61af655c19adb49 (patch)
treee02e60f86d23e53eba6bc07b12a7724cbaf3af58 /libs/hwui/renderthread/RenderThread.cpp
parent88be76b0a4ad108c4d9e2a76ba54ce8301b4dfaf (diff)
parentc6f280bf5d88156e584cb6d4aa8d9002f9cd9d48 (diff)
Merge QP1A.190404.001
Change-Id: Id8d32c9377185cecfb4bacc9a86ad7a98ab17a25
Diffstat (limited to 'libs/hwui/renderthread/RenderThread.cpp')
-rw-r--r--libs/hwui/renderthread/RenderThread.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/libs/hwui/renderthread/RenderThread.cpp b/libs/hwui/renderthread/RenderThread.cpp
index 6cce31943d03..b76e49ce94a0 100644
--- a/libs/hwui/renderthread/RenderThread.cpp
+++ b/libs/hwui/renderthread/RenderThread.cpp
@@ -209,8 +209,8 @@ void RenderThread::requireVkContext() {
mVkManager->initialize();
GrContextOptions options;
initGrContextOptions(options);
- // TODO: get a string describing the SPIR-V compiler version and use it here
- cacheManager().configureContext(&options, nullptr, 0);
+ auto vkDriverVersion = mVkManager->getDriverVersion();
+ cacheManager().configureContext(&options, &vkDriverVersion, sizeof(vkDriverVersion));
sk_sp<GrContext> grContext = mVkManager->createContext(options);
LOG_ALWAYS_FATAL_IF(!grContext.get());
setGrContext(grContext);
@@ -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();