display projection API now has a single function instead of 3

Change-Id: I9bf46d372b77d547486d4bbe6f1953ec8c65e98f
diff --git a/include/gui/SurfaceComposerClient.h b/include/gui/SurfaceComposerClient.h
index a143d81..57c72c9 100644
--- a/include/gui/SurfaceComposerClient.h
+++ b/include/gui/SurfaceComposerClient.h
@@ -121,11 +121,21 @@
             const sp<ISurfaceTexture>& surface);
     static void setDisplayLayerStack(const sp<IBinder>& token,
             uint32_t layerStack);
-    static void setDisplayOrientation(const sp<IBinder>& token,
-            uint32_t orientation);
-    static void setDisplayViewport(const sp<IBinder>& token,
-            const Rect& viewport);
-    static void setDisplayFrame(const sp<IBinder>& token, const Rect& frame);
+
+    /* setDisplayProjection() defines the projection of layer stacks
+     * to a given display.
+     *
+     * - orientation defines the display's orientation.
+     * - layerStackRect defines which area of the window manager coordinate
+     * space will be used.
+     * - displayRect defines where on the display will layerStackRect be
+     * mapped to. displayRect is specified post-orientation, that is
+     * it uses the orientation seen by the end-user.
+     */
+    static void setDisplayProjection(const sp<IBinder>& token,
+            uint32_t orientation,
+            const Rect& layerStackRect,
+            const Rect& displayRect);
 
 private:
     virtual void onFirstRef();
diff --git a/include/private/gui/LayerState.h b/include/private/gui/LayerState.h
index 65d9eb3..a7eb48c 100644
--- a/include/private/gui/LayerState.h
+++ b/include/private/gui/LayerState.h
@@ -107,11 +107,9 @@
     };
 
     enum {
-        eSurfaceChanged     = 0x01,
-        eLayerStackChanged  = 0x02,
-        eOrientationChanged = 0x04,
-        eViewportChanged    = 0x08,
-        eFrameChanged       = 0x10
+        eSurfaceChanged             = 0x01,
+        eLayerStackChanged          = 0x02,
+        eDisplayProjectionChanged   = 0x04
     };
 
     uint32_t what;