From d15321bbf57ff7a4615076fefcee5e196c4fc796 Mon Sep 17 00:00:00 2001 From: Chris Craik Date: Wed, 28 Nov 2012 14:45:04 -0800 Subject: 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 --- libs/hwui/OpenGLRenderer.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'libs/hwui/OpenGLRenderer.cpp') diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp index 678770523f85..bc30738113d4 100644 --- a/libs/hwui/OpenGLRenderer.cpp +++ b/libs/hwui/OpenGLRenderer.cpp @@ -339,6 +339,7 @@ status_t OpenGLRenderer::invokeFunctors(Rect& dirty) { size_t count = mFunctors.size(); if (count > 0) { + interrupt(); SortedVector 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; -- cgit v1.2.3-59-g8ed1b