add a layerStack attribute to Layers.

this attribute can be set through a regular transaction using
SurfaceComposerClient (just like any other attribute, eg: position or size)

Change-Id: I701a47c677ea6442ca713728a93335328cd2b172
diff --git a/include/gui/ISurfaceComposer.h b/include/gui/ISurfaceComposer.h
index de1d65d..0d4a76b 100644
--- a/include/gui/ISurfaceComposer.h
+++ b/include/gui/ISurfaceComposer.h
@@ -67,6 +67,7 @@
         eMatrixChanged              = 0x00000010,
         eTransparentRegionChanged   = 0x00000020,
         eVisibilityChanged          = 0x00000040,
+        eLayerStackChanged          = 0x00000080,
         eCropChanged                = 0x00000100,
     };
 
diff --git a/include/gui/SurfaceComposerClient.h b/include/gui/SurfaceComposerClient.h
index 9f3ef35..aef4223 100644
--- a/include/gui/SurfaceComposerClient.h
+++ b/include/gui/SurfaceComposerClient.h
@@ -119,6 +119,7 @@
     status_t    setPosition(SurfaceID id, float x, float y);
     status_t    setSize(SurfaceID id, uint32_t w, uint32_t h);
     status_t    setCrop(SurfaceID id, const Rect& crop);
+    status_t    setLayerStack(SurfaceID id, uint32_t layerStack);
     status_t    destroySurface(SurfaceID sid);
 
 private:
diff --git a/include/private/gui/LayerState.h b/include/private/gui/LayerState.h
index 97891e4..61acaac 100644
--- a/include/private/gui/LayerState.h
+++ b/include/private/gui/LayerState.h
@@ -35,7 +35,7 @@
 
     layer_state_t()
         :   surface(0), what(0),
-            x(0), y(0), z(0), w(0), h(0),
+            x(0), y(0), z(0), w(0), h(0), layerStack(0),
             alpha(0), flags(0), mask(0),
             reserved(0)
     {
@@ -60,6 +60,7 @@
             uint32_t        z;
             uint32_t        w;
             uint32_t        h;
+            uint32_t        layerStack;
             float           alpha;
             uint8_t         flags;
             uint8_t         mask;