hwc: Move resource checks to a common function.

Move resource checks, pipes, stages of mixer, bandwidth to a common
function and use it from all strategies.

Change-Id: I161fc957e2793d543b5943fbd23ae3607a4cfc87
diff --git a/libhwcomposer/hwc_mdpcomp.h b/libhwcomposer/hwc_mdpcomp.h
index 1d5d715..a7faff3 100644
--- a/libhwcomposer/hwc_mdpcomp.h
+++ b/libhwcomposer/hwc_mdpcomp.h
@@ -192,6 +192,7 @@
     bool programYUV(hwc_context_t *ctx, hwc_display_contents_1_t* list);
     void reset(const int& numAppLayers, hwc_display_contents_1_t* list);
     bool isSupportedForMDPComp(hwc_context_t *ctx, hwc_layer_1_t* layer);
+    bool resourceCheck(hwc_context_t *ctx, hwc_display_contents_1_t *list);
 
     int mDpy;
     static bool sEnabled;