From 734df4b4271e90e320f3ff37b4b0d49e92cb1e3c Mon Sep 17 00:00:00 2001 From: Chris Craik Date: Mon, 16 Jun 2014 12:05:54 -0700 Subject: [PATCH] Interrupt canvas before invoke Change-Id: I5b818958f6255c594339bd10d9efa99e9e2c00d4 --- libs/hwui/renderthread/CanvasContext.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp index 440f9659de12f..dc1951beec728 100644 --- a/libs/hwui/renderthread/CanvasContext.cpp +++ b/libs/hwui/renderthread/CanvasContext.cpp @@ -537,8 +537,11 @@ void CanvasContext::invokeFunctor(Functor* functor) { requireGlContext(); mode = DrawGlInfo::kModeProcess; } - (*functor)(mode, NULL); + if (mCanvas) { + mCanvas->interrupt(); + } + (*functor)(mode, NULL); if (mCanvas) { mCanvas->resume(); }