Skip to content

Commit a975a84

Browse files
jreckAndroid Git Automerger
authored andcommitted
am 70e5db9: Merge "Fix crash in kModeProcessNoContext" into mnc-dev
* commit '70e5db9413f82bf1f000bd99b3d2dbecf6e4ab04': Fix crash in kModeProcessNoContext
2 parents 36fc79e + 70e5db9 commit a975a84

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)