From e25d005d91344c500450f01d4a258ca9c3676627 Mon Sep 17 00:00:00 2001 From: Jesse Hall Date: Wed, 5 Sep 2012 13:03:10 -0700 Subject: [PATCH] Always reset layer acquireFenceFd after commit If SurfaceFlinger needs to refresh the screen but the dirty region is empty, it won't set the layer acquire fences, and stale file descriptors will be passed to HWC commit(). Now we make sure to clear the stale file descriptors for each layer right after commit(). Bug: 7078301 Change-Id: I6953ff91fc5488f105b30b07306f9c45a4c3f780 --- services/surfaceflinger/DisplayHardware/HWComposer.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/surfaceflinger/DisplayHardware/HWComposer.cpp b/services/surfaceflinger/DisplayHardware/HWComposer.cpp index 23290e345..113c26ca3 100644 --- a/services/surfaceflinger/DisplayHardware/HWComposer.cpp +++ b/services/surfaceflinger/DisplayHardware/HWComposer.cpp @@ -598,6 +598,8 @@ public: visibleRegion.numRects = 0; visibleRegion.rects = NULL; } + + getLayer()->acquireFenceFd = -1; } };