display : Add support for copybit composition
This change add support for copybit composition in display HAL
for MDP3 targets.
Change-Id: I9bc8e40f624b0760f4faa223cb03a13695611bb3
Acked-by: Sravan Kumar D.V.N <sravank1@codeaurora.org>
diff --git a/libhwcomposer/hwc.cpp b/libhwcomposer/hwc.cpp
index 1b1aa86..7826a5f 100644
--- a/libhwcomposer/hwc.cpp
+++ b/libhwcomposer/hwc.cpp
@@ -20,11 +20,11 @@
#include <cutils/log.h>
#include <cutils/atomic.h>
-#include <EGL/egl.h>
#include "hwc_utils.h"
#include "hwc_video.h"
#include "hwc_uimirror.h"
+#include "hwc_copybit.h"
using namespace qhwc;
@@ -83,7 +83,11 @@
} else if (0) {
//Other features
ctx->overlayInUse = true;
+ } else { // Else set this flag to false, otherwise video cases
+ // fail in non-overlay targets.
+ ctx->overlayInUse = false;
}
+ CopyBit::prepare(ctx, list);
}
return 0;
@@ -98,6 +102,7 @@
hwc_context_t* ctx = (hwc_context_t*)(dev);
if (LIKELY(list)) {
VideoOverlay::draw(ctx, list);
+ CopyBit::draw(ctx, list, (EGLDisplay)dpy, (EGLSurface)sur);
EGLBoolean sucess = eglSwapBuffers((EGLDisplay)dpy, (EGLSurface)sur);
UIMirrorOverlay::draw(ctx);
} else {