diff --git a/libs/hwui/renderthread/RenderThread.cpp b/libs/hwui/renderthread/RenderThread.cpp index a101d46f6da08..7750a31b817f9 100644 --- a/libs/hwui/renderthread/RenderThread.cpp +++ b/libs/hwui/renderthread/RenderThread.cpp @@ -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();