hwc: Implement mixed mode composition.
With this change we are moving MDP composition from all-or-nothing
implementation to mixed mode implementation where layers can
partially be composited through MDP and while rest of the layers are
composed / cached in framebuffer.
- Mixed mode design is based on layer caching
- Mixed mode path is configured only when non-bypassing
layers are cached.
- Never allow mixed mode when FB needs to be udpated.
- If we cannot bypass all MDP comp marked layers, bail
out completely.
Change-Id: Ie08f39db07e032b537f042d0d2bfe772ebfed049
diff --git a/libhwcomposer/hwc_uevents.cpp b/libhwcomposer/hwc_uevents.cpp
index b98db73..eb525a6 100644
--- a/libhwcomposer/hwc_uevents.cpp
+++ b/libhwcomposer/hwc_uevents.cpp
@@ -27,7 +27,7 @@
#include <stdlib.h>
#include "hwc_utils.h"
#include "hwc_fbupdate.h"
-#include "hwc_video.h"
+#include "hwc_mdpcomp.h"
#include "hwc_copybit.h"
#include "comptype.h"
#include "external.h"
@@ -53,12 +53,10 @@
static void setup(hwc_context_t* ctx, int dpy, bool usecopybit)
{
- ctx->mFBUpdate[dpy] =
- IFBUpdate::getObject(ctx->dpyAttr[dpy].xres, dpy);
+ ctx->mFBUpdate[dpy] = IFBUpdate::getObject(ctx->dpyAttr[dpy].xres, dpy);
+ ctx->mMDPComp[dpy] = MDPComp::getObject(ctx->dpyAttr[dpy].xres, dpy);
if(usecopybit)
ctx->mCopyBit[dpy] = new CopyBit();
- ctx->mVidOv[dpy] =
- IVideoOverlay::getObject(ctx->dpyAttr[dpy].xres, dpy);
}
static void clear(hwc_context_t* ctx, int dpy)
@@ -71,9 +69,9 @@
delete ctx->mCopyBit[dpy];
ctx->mCopyBit[dpy] = NULL;
}
- if(ctx->mVidOv[dpy]) {
- delete ctx->mVidOv[dpy];
- ctx->mVidOv[dpy] = NULL;
+ if(ctx->mMDPComp[dpy]) {
+ delete ctx->mMDPComp[dpy];
+ ctx->mMDPComp[dpy] = NULL;
}
}