summaryrefslogtreecommitdiffstats
path: root/libs/gui/include
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2019-02-27 00:01:45 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2019-02-27 00:01:45 +0000
commitd20dbdb7ed93690d4e55e45c0a67091e1efa1305 (patch)
tree36e1bf3534942014382880c48530a42154063914 /libs/gui/include
parent114998a80761a9bb25dec7711deceda13b05d712 (diff)
parent447052e2f69efb01023dcc0dce230dd649f0475f (diff)
downloadandroid_frameworks_native-d20dbdb7ed93690d4e55e45c0a67091e1efa1305.tar.gz
android_frameworks_native-d20dbdb7ed93690d4e55e45c0a67091e1efa1305.tar.bz2
android_frameworks_native-d20dbdb7ed93690d4e55e45c0a67091e1efa1305.zip
Merge changes from topic "display_policy"
* changes: SurfaceFlinger: add DISPLAY_EVENT_CONFIG_CHANGED SurfaceFlinger: add setAllowedDisplayConfigs
Diffstat (limited to 'libs/gui/include')
-rw-r--r--libs/gui/include/gui/DisplayEventReceiver.h6
-rw-r--r--libs/gui/include/gui/ISurfaceComposer.h10
-rw-r--r--libs/gui/include/gui/SurfaceComposerClient.h6
3 files changed, 21 insertions, 1 deletions
diff --git a/libs/gui/include/gui/DisplayEventReceiver.h b/libs/gui/include/gui/DisplayEventReceiver.h
index 8c3f46305..22de75149 100644
--- a/libs/gui/include/gui/DisplayEventReceiver.h
+++ b/libs/gui/include/gui/DisplayEventReceiver.h
@@ -52,6 +52,7 @@ public:
enum {
DISPLAY_EVENT_VSYNC = fourcc('v', 's', 'y', 'n'),
DISPLAY_EVENT_HOTPLUG = fourcc('p', 'l', 'u', 'g'),
+ DISPLAY_EVENT_CONFIG_CHANGED = fourcc('c', 'o', 'n', 'f'),
};
struct Event {
@@ -70,10 +71,15 @@ public:
bool connected;
};
+ struct Config {
+ int32_t configId;
+ };
+
Header header;
union {
VSync vsync;
Hotplug hotplug;
+ Config config;
};
};
diff --git a/libs/gui/include/gui/ISurfaceComposer.h b/libs/gui/include/gui/ISurfaceComposer.h
index 8654f5ef0..eedd5f583 100644
--- a/libs/gui/include/gui/ISurfaceComposer.h
+++ b/libs/gui/include/gui/ISurfaceComposer.h
@@ -360,6 +360,14 @@ public:
* Removes a listener that was streaming median luma updates from SurfaceFlinger.
*/
virtual status_t removeRegionSamplingListener(const sp<IRegionSamplingListener>& listener) = 0;
+
+ /*
+ * Sets the allowed display configurations to be used.
+ * The allowedConfigs in a vector of indexes corresponding to the configurations
+ * returned from getDisplayConfigs().
+ */
+ virtual status_t setAllowedDisplayConfigs(const sp<IBinder>& displayToken,
+ const std::vector<int32_t>& allowedConfigs) = 0;
};
// ----------------------------------------------------------------------------
@@ -407,7 +415,7 @@ public:
GET_PHYSICAL_DISPLAY_IDS,
ADD_REGION_SAMPLING_LISTENER,
REMOVE_REGION_SAMPLING_LISTENER,
-
+ SET_ALLOWED_DISPLAY_CONFIGS,
// Always append new enum to the end.
};
diff --git a/libs/gui/include/gui/SurfaceComposerClient.h b/libs/gui/include/gui/SurfaceComposerClient.h
index 6d21bff1f..4621a3478 100644
--- a/libs/gui/include/gui/SurfaceComposerClient.h
+++ b/libs/gui/include/gui/SurfaceComposerClient.h
@@ -111,6 +111,12 @@ public:
// returned by getDisplayInfo
static status_t setActiveConfig(const sp<IBinder>& display, int id);
+ // Sets the allowed display configurations to be used.
+ // The allowedConfigs in a vector of indexes corresponding to the configurations
+ // returned from getDisplayConfigs().
+ static status_t setAllowedDisplayConfigs(const sp<IBinder>& displayToken,
+ const std::vector<int32_t>& allowedConfigs);
+
// Gets the list of supported color modes for the given display
static status_t getDisplayColorModes(const sp<IBinder>& display,
Vector<ui::ColorMode>* outColorModes);