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

Commit 1f31bfad authored by Alec Mouri's avatar Alec Mouri Committed by Android (Google) Code Review
Browse files

Merge "Check if mGrContext exists when requiring a vk context."

parents b0de403a 7e7c3d72
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -199,7 +199,10 @@ void RenderThread::requireGlContext() {

void RenderThread::requireVkContext() {
    // the getter creates the context in the event it had been destroyed by destroyRenderingContext
    if (vulkanManager().hasVkContext()) {
    // Also check if we have a GrContext before returning fast. VulkanManager may be shared with
    // the HardwareBitmapUploader which initializes the Vk context without persisting the GrContext
    // in the rendering thread.
    if (vulkanManager().hasVkContext() && mGrContext) {
        return;
    }
    mVkManager->initialize();