Fix crash in kModeProcessNoContext

Bug: 22931143
Change-Id: I9897a28b1edd006aee67ae2343874ad92bbd15a0
This commit is contained in:
John Reck
2015-08-04 11:17:39 -07:00
parent fad3c66381
commit 95cd24bb9d

View File

@@ -124,9 +124,15 @@ void RenderState::bindFramebuffer(GLuint fbo) {
}
void RenderState::invokeFunctor(Functor* functor, DrawGlInfo::Mode mode, DrawGlInfo* info) {
interruptForFunctorInvoke();
(*functor)(mode, info);
resumeFromFunctorInvoke();
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() {