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
This commit is contained in:
@@ -339,6 +339,7 @@ status_t OpenGLRenderer::invokeFunctors(Rect& dirty) {
|
||||
size_t count = mFunctors.size();
|
||||
|
||||
if (count > 0) {
|
||||
interrupt();
|
||||
SortedVector<Functor*> functors(mFunctors);
|
||||
mFunctors.clear();
|
||||
|
||||
@@ -365,10 +366,7 @@ status_t OpenGLRenderer::invokeFunctors(Rect& dirty) {
|
||||
mFunctors.add(f);
|
||||
}
|
||||
}
|
||||
// protect against functors binding to other buffers
|
||||
mCaches.unbindMeshBuffer();
|
||||
mCaches.unbindIndicesBuffer();
|
||||
mCaches.activeTexture(0);
|
||||
resume();
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user