Skip to content

Commit 95cd24b

Browse files
committed
Fix crash in kModeProcessNoContext
Bug: 22931143 Change-Id: I9897a28b1edd006aee67ae2343874ad92bbd15a0
1 parent fad3c66 commit 95cd24b

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

libs/hwui/renderstate/RenderState.cpp

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,15 @@ void RenderState::bindFramebuffer(GLuint fbo) {
124124
}
125125

126126
void RenderState::invokeFunctor(Functor* functor, DrawGlInfo::Mode mode, DrawGlInfo* info) {
127-
interruptForFunctorInvoke();
128-
(*functor)(mode, info);
129-
resumeFromFunctorInvoke();
127+
if (mode == DrawGlInfo::kModeProcessNoContext) {
128+
// If there's no context we don't need to interrupt as there's
129+
// no gl state to save/restore
130+
(*functor)(mode, info);
131+
} else {
132+
interruptForFunctorInvoke();
133+
(*functor)(mode, info);
134+
resumeFromFunctorInvoke();
135+
}
130136
}
131137

132138
void RenderState::interruptForFunctorInvoke() {

0 commit comments

Comments
 (0)