Init displays to null layer stack
When a display is added, initialize it to use an empty layer stack, so
if it is somehow visible it will show black. It will be assigned the
real layer stack -- along with a projection and other properties -- by
window manager soon. Normally a display remains blanked until window
manager has decided what to show on it, but for HDMI connected at boot
that isn't currently the case.
Bug: 7258935
Change-Id: Ic9bb25f7a9b8d9d3772b097ab1d6fa03bc8780a1
diff --git a/services/surfaceflinger/DisplayDevice.h b/services/surfaceflinger/DisplayDevice.h
index bb6eb70..856366b 100644
--- a/services/surfaceflinger/DisplayDevice.h
+++ b/services/surfaceflinger/DisplayDevice.h
@@ -65,6 +65,10 @@
SWAP_RECTANGLE = 0x00080000,
};
+ enum {
+ NO_LAYER_STACK = 0xFFFFFFFF,
+ };
+
DisplayDevice(
const sp<SurfaceFlinger>& flinger,
DisplayType type,
@@ -117,7 +121,7 @@
void swapBuffers(HWComposer& hwc) const;
status_t compositionComplete() const;
-
+
// called after h/w composer has completed its set() call
void onSwapBuffersCompleted(HWComposer& hwc) const;