OSDN Git Service

SurfaceFlinger: Listen to HWC invalidate
authorDan Stoza <stoza@google.com>
Wed, 3 Dec 2014 00:58:17 +0000 (16:58 -0800)
committerDan Stoza <stoza@google.com>
Wed, 3 Dec 2014 00:58:17 +0000 (16:58 -0800)
"Do less work when using PTS" broke the invalidate path up from HWC
to SurfaceFlinger. When HWC would signal an invalidate, SurfaceFinger
would wake up, see no new buffers, and go back to sleep. This is fine,
except when the invalidate is a result of an HDMI hotplug, in which
case the screen remains blank. This change makes that functionality
work again.

Bug: 18564815
Bug: 18558468
Change-Id: I2e2171d86839945f4e4e6555d66f7e2895bd096a

services/surfaceflinger/SurfaceFlinger.cpp

index b8b6472..80d3cc2 100644 (file)
@@ -836,9 +836,11 @@ void SurfaceFlinger::onMessageReceived(int32_t what) {
         case MessageQueue::INVALIDATE: {
             bool refreshNeeded = handleMessageTransaction();
             refreshNeeded |= handleMessageInvalidate();
+            refreshNeeded |= mRepaintEverything;
             if (refreshNeeded) {
-                // Signal a refresh if a transaction modified the window state or if
-                // a new buffer was latched
+                // Signal a refresh if a transaction modified the window state,
+                // a new buffer was latched, or if HWC has requested a full
+                // repaint
                 signalRefresh();
             }
             break;