update SF binder protocol to support setting display attributes

no change of functionality -- the old behavior is implemented
on top of this new protocol.
this new protocol will allow, eventually, to pass informations
about displays and layer stacks.

Change-Id: Ic6c2295e61ec8ecbc8ce01ab7664e35d928202fc
diff --git a/include/gui/ISurfaceComposer.h b/include/gui/ISurfaceComposer.h
index 6f4be09..de1d65d 100644
--- a/include/gui/ISurfaceComposer.h
+++ b/include/gui/ISurfaceComposer.h
@@ -34,6 +34,7 @@
 // ----------------------------------------------------------------------------
 
 class ComposerState;
+class DisplayState;
 class IDisplayEventConnection;
 class IMemoryHeap;
 
@@ -104,8 +105,10 @@
     virtual sp<IMemoryHeap> getCblk() const = 0;
 
     /* open/close transactions. requires ACCESS_SURFACE_FLINGER permission */
-    virtual void setTransactionState(const Vector<ComposerState>& state,
-            int orientation, uint32_t flags) = 0;
+    virtual void setTransactionState(
+            const Vector<ComposerState>& state,
+            const Vector<DisplayState>& displays,
+            uint32_t flags) = 0;
 
     /* signal that we're done booting.
      * Requires ACCESS_SURFACE_FLINGER permission
diff --git a/include/private/gui/LayerState.h b/include/private/gui/LayerState.h
index 239dd87..97891e4 100644
--- a/include/private/gui/LayerState.h
+++ b/include/private/gui/LayerState.h
@@ -77,6 +77,17 @@
     status_t    read(const Parcel& input);
 };
 
+struct DisplayState {
+    int32_t             displayId;
+    sp<ISurfaceTexture> surface;
+    uint32_t            layerStack;
+    uint32_t            orientation;
+    Rect                viewport;
+    Rect                frame;
+    status_t    write(Parcel& output) const;
+    status_t    read(const Parcel& input);
+};
+
 }; // namespace android
 
 #endif // ANDROID_SF_LAYER_STATE_H