hwc: Support for reading FB format from driver
- Instead of assuming the default format(RGBA_8888),
read FB format from driver and pass the info to SF
- For now, this is limited to primary and HDMI only.
WB FBformat is assumed to be in RGBA_8888
- If FB doesn't have alpha channel, disable mixed mode
Change-Id: Iefc0080819749b541483ea47357bb37ec150c544
diff --git a/libhwcomposer/hwc_mdpcomp.cpp b/libhwcomposer/hwc_mdpcomp.cpp
index b45279f..0986fc6 100644
--- a/libhwcomposer/hwc_mdpcomp.cpp
+++ b/libhwcomposer/hwc_mdpcomp.cpp
@@ -1126,8 +1126,8 @@
bool MDPComp::partialMDPComp(hwc_context_t *ctx, hwc_display_contents_1_t* list)
{
- if(!sEnableMixedMode) {
- //Mixed mode is disabled. No need to even try caching.
+ if(!sEnableMixedMode || !isAlphaPresentinFB(ctx, mDpy)) {
+ //Mixed mode is disabled/can't be used. No need to even try caching.
return false;
}