summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDan Stoza <stoza@google.com>2014-05-06 21:08:16 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-05-06 21:08:16 +0000
commitdd02391756dff240c178f7cba21d73d62821007e (patch)
tree7458c8b127ae97ebd0b68977780331d42347faa8 /include
parent4522f5749d46adec0189c8dfe7f8e80b9ff4ce7e (diff)
parent7f7da32569f8e0b3d383a40b95f8ac1d55afd801 (diff)
downloadframeworks_native-dd02391756dff240c178f7cba21d73d62821007e.zip
frameworks_native-dd02391756dff240c178f7cba21d73d62821007e.tar.gz
frameworks_native-dd02391756dff240c178f7cba21d73d62821007e.tar.bz2
Merge "Enable changing display configuration"
Diffstat (limited to 'include')
-rw-r--r--include/gui/ISurfaceComposer.h17
-rw-r--r--include/gui/SurfaceComposerClient.h17
-rw-r--r--include/ui/DisplayInfo.h1
3 files changed, 29 insertions, 6 deletions
diff --git a/include/gui/ISurfaceComposer.h b/include/gui/ISurfaceComposer.h
index efde5db..8042211 100644
--- a/include/gui/ISurfaceComposer.h
+++ b/include/gui/ISurfaceComposer.h
@@ -113,9 +113,18 @@ public:
*/
virtual void unblank(const sp<IBinder>& display) = 0;
- /* returns information about a display
+ /* returns information for each configuration of the given display
* intended to be used to get information about built-in displays */
- virtual status_t getDisplayInfo(const sp<IBinder>& display, DisplayInfo* info) = 0;
+ virtual status_t getDisplayConfigs(const sp<IBinder>& display,
+ Vector<DisplayInfo>* configs) = 0;
+
+ /* indicates which of the configurations returned by getDisplayInfo is
+ * currently active */
+ virtual int getActiveConfig(const sp<IBinder>& display) = 0;
+
+ /* specifies which configuration (of those returned by getDisplayInfo)
+ * should be used */
+ virtual status_t setActiveConfig(const sp<IBinder>& display, int id) = 0;
/* Capture the specified screen. requires READ_FRAME_BUFFER permission
* This function will fail if there is a secure window on screen.
@@ -158,7 +167,9 @@ public:
AUTHENTICATE_SURFACE,
BLANK,
UNBLANK,
- GET_DISPLAY_INFO,
+ GET_DISPLAY_CONFIGS,
+ GET_ACTIVE_CONFIG,
+ SET_ACTIVE_CONFIG,
CONNECT_DISPLAY,
CAPTURE_SCREEN,
CLEAR_ANIMATION_FRAME_STATS,
diff --git a/include/gui/SurfaceComposerClient.h b/include/gui/SurfaceComposerClient.h
index 6a53ccb..c2192af 100644
--- a/include/gui/SurfaceComposerClient.h
+++ b/include/gui/SurfaceComposerClient.h
@@ -66,8 +66,21 @@ public:
status_t linkToComposerDeath(const sp<IBinder::DeathRecipient>& recipient,
void* cookie = NULL, uint32_t flags = 0);
- // Get information about a display
- static status_t getDisplayInfo(const sp<IBinder>& display, DisplayInfo* info);
+ // Get a list of supported configurations for a given display
+ static status_t getDisplayConfigs(const sp<IBinder>& display,
+ Vector<DisplayInfo>* configs);
+
+ // Get the DisplayInfo for the currently-active configuration
+ static status_t getDisplayInfo(const sp<IBinder>& display,
+ DisplayInfo* info);
+
+ // Get the index of the current active configuration (relative to the list
+ // returned by getDisplayInfo)
+ static int getActiveConfig(const sp<IBinder>& display);
+
+ // Set a new active configuration using an index relative to the list
+ // returned by getDisplayInfo
+ static status_t setActiveConfig(const sp<IBinder>& display, int id);
/* triggers screen off and waits for it to complete */
static void blankDisplay(const sp<IBinder>& display);
diff --git a/include/ui/DisplayInfo.h b/include/ui/DisplayInfo.h
index 2853e06..3b5cd6d 100644
--- a/include/ui/DisplayInfo.h
+++ b/include/ui/DisplayInfo.h
@@ -33,7 +33,6 @@ struct DisplayInfo {
float density;
uint8_t orientation;
bool secure;
- uint8_t reserved[2];
};
/* Display orientations as defined in Surface.java and ISurfaceComposer.h. */