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

Commit a975a844 authored by John Reck's avatar John Reck Committed by Android Git Automerger
Browse files

am 70e5db94: Merge "Fix crash in kModeProcessNoContext" into mnc-dev

* commit '70e5db94':
  Fix crash in kModeProcessNoContext
parents 36fc79e2 70e5db94
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -124,10 +124,16 @@ void RenderState::bindFramebuffer(GLuint fbo) {
}

void RenderState::invokeFunctor(Functor* functor, DrawGlInfo::Mode mode, DrawGlInfo* info) {
    if (mode == DrawGlInfo::kModeProcessNoContext) {
        // If there's no context we don't need to interrupt as there's
        // no gl state to save/restore
        (*functor)(mode, info);
    } else {
        interruptForFunctorInvoke();
        (*functor)(mode, info);
        resumeFromFunctorInvoke();
    }
}

void RenderState::interruptForFunctorInvoke() {
    mCaches->setProgram(nullptr);