Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 30b90963 authored by Stan Iliev's avatar Stan Iliev
Browse files

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
parent dece92b2
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -408,12 +408,13 @@ bool RenderThread::isCurrent() {
}

void RenderThread::preload() {
    // EGL driver is always preloaded only if HWUI renders with GL.
    if (Properties::getRenderPipelineType() == RenderPipelineType::SkiaGL) {
        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) {
    } else {
        requireVkContext();
    }
    HardwareBitmapUploader::initialize();