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

Commit d1c374c9 authored by Shadman Shadid's avatar Shadman Shadid Committed by Android (Google) Code Review
Browse files

Merge "Only preload egl context" into main

parents ad03aa84 5f66a5be
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -323,6 +323,7 @@ void RenderThread::initGrContextOptions(GrContextOptions& options) {
}

void RenderThread::destroyRenderingContext() {
    ATRACE_CALL();
    mFunctorManager.onContextDestroyed();
    if (Properties::getRenderPipelineType() == RenderPipelineType::SkiaGL) {
        if (mEglManager->hasEglContext()) {
@@ -520,7 +521,10 @@ void RenderThread::preload() {
    // EGL driver is always preloaded only if HWUI renders with GL.
    if (Properties::getRenderPipelineType() == RenderPipelineType::SkiaGL) {
        if (Properties::earlyPreloadGlContext()) {
            queue().post([this]() { requireGlContext(); });
            queue().post([this]() {
                ATRACE_NAME("earlyPreloadGlContext");
                requireGlContext();
            });
        } else {
            std::thread eglInitThread([]() { eglGetDisplay(EGL_DEFAULT_DISPLAY); });
            eglInitThread.detach();
@@ -528,9 +532,6 @@ void RenderThread::preload() {
    } else {
        requireVkContext();
    }
    if (Properties::earlyPreloadGlContext()) {
        queue().post([]() { GraphicBufferAllocator::getInstance(); });
    }
    HardwareBitmapUploader::initialize();
}