diff options
author | John Reck <jreck@google.com> | 2015-08-04 19:48:30 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-08-04 19:48:30 +0000 |
commit | a975a84498014526d665f3bf7d0a5387f6e8a96b (patch) | |
tree | 985ff02fdaa8fd2890427f750171339bdd2a2839 /libs/hwui | |
parent | 36fc79e2f8f4b4e186dd7de4c646639c434f3e8b (diff) | |
parent | 70e5db9413f82bf1f000bd99b3d2dbecf6e4ab04 (diff) | |
download | frameworks_base-a975a84498014526d665f3bf7d0a5387f6e8a96b.zip frameworks_base-a975a84498014526d665f3bf7d0a5387f6e8a96b.tar.gz frameworks_base-a975a84498014526d665f3bf7d0a5387f6e8a96b.tar.bz2 |
am 70e5db94: Merge "Fix crash in kModeProcessNoContext" into mnc-dev
* commit '70e5db9413f82bf1f000bd99b3d2dbecf6e4ab04':
Fix crash in kModeProcessNoContext
Diffstat (limited to 'libs/hwui')
-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 3ebd57b..1e39bfa 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() { |