hwc: Refactor disable animation on external

Fall back to GPU for one cycle at the start of animation and display
the frame buffer for the subsequent cycle till animation ends.

Change-Id: I6c651cebaf4694f326d6e32ae485e014f391577c
diff --git a/libhwcomposer/hwc_utils.h b/libhwcomposer/hwc_utils.h
index 2503e43..1eb6610 100644
--- a/libhwcomposer/hwc_utils.h
+++ b/libhwcomposer/hwc_utils.h
@@ -410,6 +410,11 @@
 
 }; //qhwc namespace
 
+enum eAnimationState{
+    ANIMATION_STOPPED,
+    ANIMATION_STARTED,
+};
+
 // -----------------------------------------------------------------------------
 // HWC context
 // This structure contains overall state
@@ -439,14 +444,10 @@
     qhwc::HwcDebug *mHwcDebug[HWC_NUM_DISPLAY_TYPES];
     qhwc::AssertiveDisplay *mAD;
     qhwc::VPUClient *mVPUClient;
+    eAnimationState mAnimationState[HWC_NUM_DISPLAY_TYPES];
 
-    // No animation on External display feature
-    // Notifies hwcomposer about the device orientation before animation.
+    // stores the primary device orientation
     int deviceOrientation;
-    // Stores the crop, dest rect and transform value of video before animation.
-    hwc_rect_t mPrevCropVideo;
-    hwc_rect_t mPrevDestVideo;
-    int mPrevTransformVideo;
     //Securing in progress indicator
     bool mSecuring;
     //WFD on proprietary stack