diff options
| author | 2015-08-04 19:54:45 +0000 | |
|---|---|---|
| committer | 2015-08-04 19:54:45 +0000 | |
| commit | e28c5d62aad1d14901ccfe40e5177f5794c42f2b (patch) | |
| tree | 745679308cc4a49b4843ee13d27c0056ba998ec4 | |
| parent | 8d45b98def417c70af2ce98bc40078279cba6a7d (diff) | |
| parent | a975a84498014526d665f3bf7d0a5387f6e8a96b (diff) | |
am a975a844: am 70e5db94: Merge "Fix crash in kModeProcessNoContext" into mnc-dev
* commit 'a975a84498014526d665f3bf7d0a5387f6e8a96b':
Fix crash in kModeProcessNoContext
| -rw-r--r-- | libs/hwui/renderstate/RenderState.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/libs/hwui/renderstate/RenderState.cpp b/libs/hwui/renderstate/RenderState.cpp index 3ebd57b33c81..1e39bfa4b583 100644 --- a/libs/hwui/renderstate/RenderState.cpp +++ b/libs/hwui/renderstate/RenderState.cpp @@ -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() { |