hwc: enable dual display on hwc 1.1
Enable dual display on HWC 1.1; video uses overlay.
Bug: 7124159
Change-Id: I8333e46cfc74072f6259fba2b82368f0dd52b6df
Signed-off-by: Iliyan Malchev <malchev@google.com>
diff --git a/liboverlay/overlay.h b/liboverlay/overlay.h
index 12b3883..f8f9c34 100644
--- a/liboverlay/overlay.h
+++ b/liboverlay/overlay.h
@@ -66,8 +66,11 @@
/* expose state */
utils::eOverlayState getState() const;
- /* Returns the singleton instance of overlay */
- static Overlay* getInstance();
+ /* Closes open pipes */
+ static void initOverlay();
+
+ /* Returns the per-display singleton instance of overlay */
+ static Overlay* getInstance(int disp);
private:
/* Ctor setup */
@@ -84,8 +87,8 @@
/* Holds the actual overlay impl, set when changing state*/
OverlayImplBase *mOv;
- /* Singleton Instance*/
- static Overlay *sInstance;
+ /* Per-display Singleton Instance HWC_NUM_DISPLAY_TYPES */
+ static Overlay *sInstance[2];
};
} // overlay