summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
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() {