overlay: Remove usage of scale header

Remove usage of scale header and do not create or destroy objects.
the programScale() function exported out of libscale.so will
internally manage objects.

This frees up overlay from relying on scale.h which may not be
exported by libscale.so to a known location if only binaries are
shipped.

Change-Id: If6970541e2eb0ee2bdb907c73ed3534fc22e9dd1
diff --git a/liboverlay/overlay.h b/liboverlay/overlay.h
index 455f547..94dcfed 100644
--- a/liboverlay/overlay.h
+++ b/liboverlay/overlay.h
@@ -35,9 +35,6 @@
 #include "utils/threads.h"
 
 struct MetaData_t;
-namespace scale {
-class Scale;
-};
 
 namespace overlay {
 class GenericPipe;
@@ -171,8 +168,8 @@
     utils::eDest getPipe_8x26(const PipeSpecs& pipeSpecs);
     utils::eDest getPipe_8x16(const PipeSpecs& pipeSpecs);
 
-    /* Returns the scalar object */
-    static scale::Scale *getScalar();
+    /* Returns the handle to libscale.so's programScale function */
+    static int (*getFnProgramScale())(struct mdp_overlay_list *);
     /* Creates a scalar object using libscale.so */
     static void initScalar();
     /* Destroys the scalar object using libscale.so */
@@ -243,7 +240,7 @@
     static int sDMAMode;
     static bool sDMAMultiplexingSupported;
     static void *sLibScaleHandle;
-    static scale::Scale *sScale;
+    static int (*sFnProgramScale)(struct mdp_overlay_list *);
 
     friend class MdpCtrl;
 };
@@ -332,8 +329,8 @@
     return sDpyFbMap[dpy];
 }
 
-inline scale::Scale *Overlay::getScalar() {
-    return sScale;
+inline int (*Overlay::getFnProgramScale())(struct mdp_overlay_list *) {
+    return sFnProgramScale;
 }
 
 inline bool Overlay::PipeBook::valid() {