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_utils.h b/libhwcomposer/hwc_utils.h
index 3dc327f..3d8b1e4 100644
--- a/libhwcomposer/hwc_utils.h
+++ b/libhwcomposer/hwc_utils.h
@@ -272,6 +272,10 @@
const hwc_rect_t& pos, const MetaData_t *metadata,
const ovutils::eDest& dest);
+int configColorLayer(hwc_context_t *ctx, hwc_layer_1_t *layer, const int& dpy,
+ ovutils::eMdpFlags& mdpFlags, ovutils::eZorder& z,
+ ovutils::eIsFg& isFg, const ovutils::eDest& dest);
+
void updateSource(ovutils::eTransform& orient, ovutils::Whf& whf,
hwc_rect_t& crop);
@@ -463,7 +467,8 @@
}
static inline bool has90Transform(hwc_layer_1_t *layer) {
- return (layer->transform & HWC_TRANSFORM_ROT_90);
+ return ((layer->transform & HWC_TRANSFORM_ROT_90) &&
+ !(layer->flags & HWC_COLOR_FILL));
}
inline bool isSecurePresent(hwc_context_t *ctx, int dpy) {