teach HWC about multiple displays

Change-Id: I5e72a83d419a729835cb0e1ec45557b4d3fb56b1
diff --git a/services/surfaceflinger/DisplayHardware/HWComposer.h b/services/surfaceflinger/DisplayHardware/HWComposer.h
index 857b82c..7b92d2e 100644
--- a/services/surfaceflinger/DisplayHardware/HWComposer.h
+++ b/services/surfaceflinger/DisplayHardware/HWComposer.h
@@ -86,9 +86,6 @@
     // Asks the HAL what it can do
     status_t prepare();
 
-    // disable hwc until next createWorkList
-    status_t disable();
-
     // commits the list
     status_t commit();
 
@@ -254,12 +251,18 @@
 
     struct DisplayData {
         DisplayData() : xdpi(0), ydpi(0), refresh(0),
-            hasFbComp(false), hasOvComp(false) { }
+            hasFbComp(false), hasOvComp(false),
+            capacity(0), list(NULL) { }
+        ~DisplayData() {
+            free(list);
+        }
         float xdpi;
         float ydpi;
         nsecs_t refresh;
         bool hasFbComp;
         bool hasOvComp;
+        size_t capacity;
+        hwc_display_contents_1* list;
     };
 
     sp<SurfaceFlinger>              mFlinger;
@@ -271,13 +274,12 @@
     DisplayData                     mDisplayData[MAX_DISPLAYS];
     size_t                          mNumDisplays;
 
-    size_t                          mCapacity;
     cb_context*                     mCBContext;
     EventHandler&                   mEventHandler;
     size_t                          mVSyncCount;
     sp<VSyncThread>                 mVSyncThread;
     bool                            mDebugForceFakeVSync;
-    BitSet32                        mTokens;
+    BitSet32                        mAllocatedDisplayIDs;
 
     // protected by mLock
     mutable Mutex mLock;