summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2015-08-04 11:17:39 -0700
committerJohn Reck <jreck@google.com>2015-08-04 18:19:11 +0000
commit95cd24bb9d000eb541bc7ec7e6b53d1c7e313076 (patch)
treefa74c9a2cb03bfadc84109fbf086189340e9bef7 /libs
parentfad3c6638168ad65b4f4677a777b8f2dc7e5c9c9 (diff)
downloadframeworks_base-95cd24bb9d000eb541bc7ec7e6b53d1c7e313076.zip
frameworks_base-95cd24bb9d000eb541bc7ec7e6b53d1c7e313076.tar.gz
frameworks_base-95cd24bb9d000eb541bc7ec7e6b53d1c7e313076.tar.bz2
Fix crash in kModeProcessNoContext
Bug: 22931143 Change-Id: I9897a28b1edd006aee67ae2343874ad92bbd15a0
Diffstat (limited to 'libs')
-rw-r--r--libs/hwui/renderstate/RenderState.cpp12
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() {