Skip to content

Commit 70e5db9

Browse files
jreckAndroid (Google) Code Review
authored andcommitted
Merge "Fix crash in kModeProcessNoContext" into mnc-dev
2 parents 35a1a20 + 95cd24b commit 70e5db9

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)