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

* commit 'e28c5d62aad1d14901ccfe40e5177f5794c42f2b':
  Fix crash in kModeProcessNoContext
This commit is contained in:
John Reck
2015-08-04 20:03:26 +00:00
committed by Android Git Automerger

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() {