Skip to content

Commit d15321b

Browse files
committed
Use the same interrupt/resume logic for all functor calls
bug:7093396 The functor was able to change the renderer's blend mode without it being restored in process mode. This single path of updating gl caches reduces likelihood of this occurring in the future. Change-Id: Ie367532f9c683299f02bc4f635d7cb31f96db39f
1 parent f0afad0 commit d15321b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

libs/hwui/OpenGLRenderer.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,7 @@ status_t OpenGLRenderer::invokeFunctors(Rect& dirty) {
339339
size_t count = mFunctors.size();
340340

341341
if (count > 0) {
342+
interrupt();
342343
SortedVector<Functor*> functors(mFunctors);
343344
mFunctors.clear();
344345

@@ -365,10 +366,7 @@ status_t OpenGLRenderer::invokeFunctors(Rect& dirty) {
365366
mFunctors.add(f);
366367
}
367368
}
368-
// protect against functors binding to other buffers
369-
mCaches.unbindMeshBuffer();
370-
mCaches.unbindIndicesBuffer();
371-
mCaches.activeTexture(0);
369+
resume();
372370
}
373371

374372
return result;

0 commit comments

Comments
 (0)