hwc: Include more cases in partial MDP composition.

When MDP cannot support a layer, we send the whole list of layers to
GPU. If such layers are not updating they can be cached on FB while
allowing the rest to take the MDP route.

Example # 1: Volume bar on video in 90 rotated mode. Since volume bar
is not h/w accelerated, there is no prerotation and we invoke the GPU
for redraws each round. With this change we won't because of caching.

Example # 2: If prerotation is applied to layers on primary, the
secondary layers would show a transform and the whole list is redrawn
with GPU. Now we could make use of caching.

This change also imposes a 1 layer limit on secondary, but now allows
full and partial MDP comp, thus benefiting secondary-only content.

Change-Id: I7eb43ba817f1081f317fefa99fa0c507344060e8
diff --git a/libhwcomposer/hwc_utils.h b/libhwcomposer/hwc_utils.h
index 7668b5f..e616e42 100644
--- a/libhwcomposer/hwc_utils.h
+++ b/libhwcomposer/hwc_utils.h
@@ -405,6 +405,11 @@
 static inline bool isYuvPresent (hwc_context_t *ctx, int dpy) {
     return  ctx->listStats[dpy].yuvCount;
 }
+
+static inline bool has90Transform(hwc_layer_1_t *layer) {
+    return (layer->transform & HWC_TRANSFORM_ROT_90);
+}
+
 };
 
 #endif //HWC_UTILS_H