display: Add support for MDP Composition
This change
1) implements MDP Composition upto 3 layers
2) adds invalidator support to fall back to FB
composition during idle screen condition.
Change-Id: I8d724f905c943f986b68596e2548a7f5a8ce6588
diff --git a/libhwcomposer/hwc.cpp b/libhwcomposer/hwc.cpp
index 81ccad2..10c2948 100644
--- a/libhwcomposer/hwc.cpp
+++ b/libhwcomposer/hwc.cpp
@@ -30,6 +30,7 @@
#include "hwc_uimirror.h"
#include "hwc_copybit.h"
#include "hwc_external.h"
+#include "hwc_mdpcomp.h"
using namespace qhwc;
@@ -84,6 +85,8 @@
//Nothing here
} else if(UIMirrorOverlay::prepare(ctx, list)) {
ctx->overlayInUse = true;
+ } else if(MDPComp::configure(dev, list)) {
+ ctx->overlayInUse = true;
} else if (0) {
//Other features
ctx->overlayInUse = true;
@@ -152,6 +155,7 @@
if (LIKELY(list)) {
VideoOverlay::draw(ctx, list);
CopyBit::draw(ctx, list, (EGLDisplay)dpy, (EGLSurface)sur);
+ MDPComp::draw(ctx, list);
EGLBoolean sucess = eglSwapBuffers((EGLDisplay)dpy, (EGLSurface)sur);
UIMirrorOverlay::draw(ctx);
if(ctx->mExtDisplay->getExternalDisplay())