cleanups in preparation of bigger changes

- fix typo drawForSreenshot misspelled
- get rid of DisplayDeviceBase
- removed unused or unneeded code
- always pass a DisplayDevice to Layer methods that are called
  on a per-display basis (to make it clear that this could be
  called more than once per composition).

Change-Id: Id948b7e09fe5c06db0e42d40d6ed75dd095c7f44
diff --git a/services/surfaceflinger/LayerBase.h b/services/surfaceflinger/LayerBase.h
index 5aab4fc..e1d6793 100644
--- a/services/surfaceflinger/LayerBase.h
+++ b/services/surfaceflinger/LayerBase.h
@@ -134,8 +134,10 @@
 
     virtual void setGeometry(const DisplayDevice& hw,
             HWComposer::HWCLayerInterface& layer);
-    virtual void setPerFrameData(HWComposer::HWCLayerInterface& layer);
-    virtual void setAcquireFence(HWComposer::HWCLayerInterface& layer);
+    virtual void setPerFrameData(const DisplayDevice& hw,
+            HWComposer::HWCLayerInterface& layer);
+    virtual void setAcquireFence(const DisplayDevice& hw,
+            HWComposer::HWCLayerInterface& layer);
 
     /**
      * draw - performs some global clipping optimizations
@@ -144,7 +146,7 @@
      * to perform the actual drawing.  
      */
     virtual void draw(const DisplayDevice& hw, const Region& clip) const;
-    virtual void drawForSreenShot(const DisplayDevice& hw);
+    virtual void drawForScreenShot(const DisplayDevice& hw);
     
     /**
      * onDraw - draws the surface.
@@ -216,13 +218,18 @@
 
     /** called after page-flip
      */
-    virtual void onLayerDisplayed(HWComposer::HWCLayerInterface* layer) { }
+    virtual void onLayerDisplayed(const DisplayDevice& hw,
+            HWComposer::HWCLayerInterface* layer) { }
 
     /** called before composition.
      * returns true if the layer has pending updates.
      */
     virtual bool onPreComposition() { return false; }
 
+    /** called before composition.
+     */
+    virtual void onPostComposition() { }
+
     /** always call base class first */
     virtual void dump(String8& result, char* scratch, size_t size) const;
     virtual void shortDump(String8& result, char* scratch, size_t size) const;