hwcomposer: Add support for UI mirroring
- Uevent observer as part of Hwcomposer
- HPD, enabling/disabling external display from HWC
Change-Id: I52b4f30c78e98c5b52c86722046389f458c2dbee
diff --git a/libhwcomposer/hwc.cpp b/libhwcomposer/hwc.cpp
index 699e2ac..8aa6e83 100644
--- a/libhwcomposer/hwc.cpp
+++ b/libhwcomposer/hwc.cpp
@@ -24,6 +24,7 @@
#include "hwc_utils.h"
#include "hwc_video.h"
+#include "hwc_uimirror.h"
using namespace qhwc;
@@ -76,11 +77,14 @@
if(VideoOverlay::prepare(ctx, list)) {
ctx->overlayInUse = true;
//Nothing here
+ } else if(UIMirrorOverlay::prepare(ctx, list)) {
+ ctx->overlayInUse = true;
} else if (0) {
//Other features
ctx->overlayInUse = true;
}
}
+
return 0;
}
@@ -94,6 +98,7 @@
if (LIKELY(list)) {
VideoOverlay::draw(ctx, list);
EGLBoolean sucess = eglSwapBuffers((EGLDisplay)dpy, (EGLSurface)sur);
+ UIMirrorOverlay::draw(ctx);
} else {
ctx->mOverlay->setState(ovutils::OV_CLOSED);
ctx->qbuf->unlockAllPrevious();