hwc: Add support for external-only layers
Add support for different types of external-only layers
EXTERNAL_ONLY: General purpose
EXTERNAL_BLOCK: Blocks the display of other ext-only layers
EXTERNAL_CC: Used for closed captions with videos.
Change-Id: I9cc7b9a1dbf1085194725474d6a4d1094e27a0c8
Acked-by: Saurabh Shah <saurshah@codeaurora.org>
diff --git a/libhwcomposer/hwc.cpp b/libhwcomposer/hwc.cpp
index 13d6274..ad84d25 100644
--- a/libhwcomposer/hwc.cpp
+++ b/libhwcomposer/hwc.cpp
@@ -32,6 +32,7 @@
#include "hwc_copybit.h"
#include "hwc_external.h"
#include "hwc_mdpcomp.h"
+#include "hwc_extonly.h"
using namespace qhwc;
@@ -81,10 +82,16 @@
return 0;
if (LIKELY(list)) {
+ //reset for this draw round
+ VideoOverlay::reset();
+ ExtOnly::reset();
+
getLayerStats(ctx, list);
if(VideoOverlay::prepare(ctx, list)) {
ctx->overlayInUse = true;
//Nothing here
+ } else if(ExtOnly::prepare(ctx, list)) {
+ ctx->overlayInUse = true;
} else if(UIMirrorOverlay::prepare(ctx, list)) {
ctx->overlayInUse = true;
} else if(MDPComp::configure(dev, list)) {
@@ -156,6 +163,7 @@
hwc_context_t* ctx = (hwc_context_t*)(dev);
if (LIKELY(list)) {
VideoOverlay::draw(ctx, list);
+ ExtOnly::draw(ctx, list);
CopyBit::draw(ctx, list, (EGLDisplay)dpy, (EGLSurface)sur);
MDPComp::draw(ctx, list);
EGLBoolean sucess = eglSwapBuffers((EGLDisplay)dpy, (EGLSurface)sur);