hwc/overlay: Add Color layer support in MDP Composition.
1. Color layer has a destination rectangle, RGBA color and plane
alpha. There is no gralloc buffer. Layer flag "HWC_COLOR_FILL"
denotes a Color layer.
2. There is no color member in HWC layer, so RGBA color value
is passed via the "tranform" member from framework to HAL.
Change-Id: I8769fd3f5febcaf952a1456de0a4262679c9a0e4
diff --git a/libhwcomposer/hwc_mdpcomp.cpp b/libhwcomposer/hwc_mdpcomp.cpp
index 8342615..a524a78 100644
--- a/libhwcomposer/hwc_mdpcomp.cpp
+++ b/libhwcomposer/hwc_mdpcomp.cpp
@@ -288,6 +288,10 @@
private_handle_t *hnd = (private_handle_t *)layer->handle;
if(!hnd) {
+ if (layer->flags & HWC_COLOR_FILL) {
+ // Color layer
+ return true;
+ }
ALOGE("%s: layer handle is NULL", __FUNCTION__);
return false;
}
@@ -1381,8 +1385,13 @@
hwc_layer_1_t *layer = &list->hwLayers[i];
private_handle_t *hnd = (private_handle_t *)layer->handle;
if(!hnd) {
- ALOGE("%s handle null", __FUNCTION__);
- return false;
+ if (!(layer->flags & HWC_COLOR_FILL)) {
+ ALOGE("%s handle null", __FUNCTION__);
+ return false;
+ }
+ // No PLAY for Color layer
+ layerProp[i].mFlags &= ~HWC_MDPCOMP;
+ continue;
}
int mdpIndex = mCurrentFrame.layerToMDP[i];