From f5702ff8b1919e0a5d342ad04ac486bbcde41461 Mon Sep 17 00:00:00 2001 From: Dan Stoza Date: Wed, 2 Nov 2016 16:27:47 -0700 Subject: [PATCH] SF: Request SF wakeup for pending transactions When a Layer receives a pending transaction, it sets a flag on itself that it needs a transaction to be handled, but it doesn't notify SurfaceFlinger to iterate through the layers and check for that flag. In some cases, this led to transactions never being processed, which can hang an application trying to push buffers that are part of a synchronized transaction. This change pokes SurfaceFlinger when setting the Layer flag so that it doesn't slip through the cracks. Bug: 32541494 Test: Two successful monkey runs Change-Id: I4b906eee8004fad1938aa94a1aa0a0c7ea289102 --- services/surfaceflinger/Layer.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp index d420f0fc93..f9e93d3083 100644 --- a/services/surfaceflinger/Layer.cpp +++ b/services/surfaceflinger/Layer.cpp @@ -1346,6 +1346,7 @@ void Layer::pushPendingState() { // Wake us up to check if the frame has been received setTransactionFlags(eTransactionNeeded); + mFlinger->setTransactionFlags(eTraversalNeeded); } mPendingStates.push_back(mCurrentState); } -- 2.11.0