Revert "merge various SF fixes from gingerbread to honeycomb-mr2" (DO NOT MERGE)

Also revert all dependent changes:
This reverts commit 8e18668d14adf601cbe5973030c310ec23d88461.
This reverts commit 69b4587bfbb3e98f793959d9123340360fa233a2.
This reverts commit a9c9a4baf24700e8817d47d8ea8da1742caea0b5.
This reverts commit 2c0042b666a969091c931614f2fc0dce2f1cfac8.
This reverts commit f6c8206735e7e078461e5f2aef6e1a1446fdd075.
This reverts commit 24855c09173a6caaec7dcedd0c2d7ce15121d39b.

Change-Id: I33e699640f3f59e42fa03c99a9a1b7af0d27d4d8
diff --git a/services/surfaceflinger/LayerBase.h b/services/surfaceflinger/LayerBase.h
index 6c49a19..7162e47 100644
--- a/services/surfaceflinger/LayerBase.h
+++ b/services/surfaceflinger/LayerBase.h
@@ -202,6 +202,10 @@
      */
     virtual bool isProtected() const   { return false; }
 
+    /** Called from the main thread, when the surface is removed from the
+     * draw list */
+    virtual status_t ditch() { return NO_ERROR; }
+
     /** called with the state lock when the surface is removed from the
      *  current list */
     virtual void onRemoved() { };
@@ -267,8 +271,7 @@
     volatile    int32_t         mInvalidate;
                 
 
-public:
-    // called from class SurfaceFlinger
+protected:
     virtual ~LayerBase();
 
 private: