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

Commit c9cbe42c authored by John Reck's avatar John Reck Committed by The Android Automerger
Browse files

Fix crash in kModeProcessNoContext

Bug: 22931143
Change-Id: I9897a28b1edd006aee67ae2343874ad92bbd15a0
parent ff2b059f
Loading
Loading
Loading
Loading
+9 −3
Original line number Original line Diff line number Diff line
@@ -124,10 +124,16 @@ void RenderState::bindFramebuffer(GLuint fbo) {
}
}


void RenderState::invokeFunctor(Functor* functor, DrawGlInfo::Mode mode, DrawGlInfo* info) {
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();
        interruptForFunctorInvoke();
        (*functor)(mode, info);
        (*functor)(mode, info);
        resumeFromFunctorInvoke();
        resumeFromFunctorInvoke();
    }
    }
}


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