From 00e8c7a88a5b9c4104a71013a713acd3e4d3b77b Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Tue, 4 Sep 2012 19:30:46 -0700 Subject: display projection API now has a single function instead of 3 Change-Id: I9bf46d372b77d547486d4bbe6f1953ec8c65e98f --- include/gui/SurfaceComposerClient.h | 20 +++++++++++++++----- include/private/gui/LayerState.h | 8 +++----- 2 files changed, 18 insertions(+), 10 deletions(-) (limited to 'include') 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 @@ public: const sp& surface); static void setDisplayLayerStack(const sp& token, uint32_t layerStack); - static void setDisplayOrientation(const sp& token, - uint32_t orientation); - static void setDisplayViewport(const sp& token, - const Rect& viewport); - static void setDisplayFrame(const sp& 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& 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 @@ struct DisplayState { }; enum { - eSurfaceChanged = 0x01, - eLayerStackChanged = 0x02, - eOrientationChanged = 0x04, - eViewportChanged = 0x08, - eFrameChanged = 0x10 + eSurfaceChanged = 0x01, + eLayerStackChanged = 0x02, + eDisplayProjectionChanged = 0x04 }; uint32_t what; -- cgit v1.1