hwc: Fix alpha downscale check for mdp composition
Do not allow mdp composition when any layer format has alpha channel
and needs scaling as the VG pipes are not supporting alpha downscaling.
In few scenarios, at the beginning/ending of animations Surface Flinger
passes few frames with flag HWC_BLENDING_NONE though it has Alpha.
When such layer passed to VG piple and if needs scaling , it results in
flicker. Hence, just checking for HWC_BLENDING_NONE is not enough.
Change-Id: I70fdfe4547df6fe7b2771ed8042f43aa4e07a71d
CRs-fixed: 462508
diff --git a/libhwcomposer/hwc_utils.h b/libhwcomposer/hwc_utils.h
index 52069ba..032f589 100644
--- a/libhwcomposer/hwc_utils.h
+++ b/libhwcomposer/hwc_utils.h
@@ -143,6 +143,7 @@
bool isSecureModePolicy(int mdpVersion);
bool isExternalActive(hwc_context_t* ctx);
bool needsScaling(hwc_layer_1_t const* layer);
+bool isAlphaPresent(hwc_layer_1_t const* layer);
int hwc_vsync_control(hwc_context_t* ctx, int dpy, int enable);
//Helper function to dump logs