diff options
author | Ady Abraham <adyabr@google.com> | 2019-02-26 14:08:03 -0800 |
---|---|---|
committer | Ady Abraham <adyabr@google.com> | 2019-02-27 12:26:37 -0800 |
commit | d9b3ea613a021c7b393db967298fc8fa2fef7300 (patch) | |
tree | 18b67b08acf411d376d4d45be3d993286090fd64 /libs/gui/include | |
parent | 51988ef2241b2dad4b115f22c35de69c2437995f (diff) | |
download | android_frameworks_native-d9b3ea613a021c7b393db967298fc8fa2fef7300.tar.gz android_frameworks_native-d9b3ea613a021c7b393db967298fc8fa2fef7300.tar.bz2 android_frameworks_native-d9b3ea613a021c7b393db967298fc8fa2fef7300.zip |
SurfaceFlinger: add getAllowedDisplayConfigs
Add an API to ISurfaceComposer to get allowed display configurations.
Test: manual test that calls getAllowedDisplayConfigs()
Bug: 122905403
Change-Id: Ieeb04f0d002ecfb2dbb0acd22ef6f659806c3950
Diffstat (limited to 'libs/gui/include')
-rw-r--r-- | libs/gui/include/gui/ISurfaceComposer.h | 9 | ||||
-rw-r--r-- | libs/gui/include/gui/SurfaceComposerClient.h | 6 |
2 files changed, 15 insertions, 0 deletions
diff --git a/libs/gui/include/gui/ISurfaceComposer.h b/libs/gui/include/gui/ISurfaceComposer.h index 0d5b7679e..890367cd1 100644 --- a/libs/gui/include/gui/ISurfaceComposer.h +++ b/libs/gui/include/gui/ISurfaceComposer.h @@ -367,6 +367,14 @@ public: */ virtual status_t setAllowedDisplayConfigs(const sp<IBinder>& displayToken, const std::vector<int32_t>& allowedConfigs) = 0; + + /* + * Returns the allowed display configurations currently set. + * The allowedConfigs in a vector of indexes corresponding to the configurations + * returned from getDisplayConfigs(). + */ + virtual status_t getAllowedDisplayConfigs(const sp<IBinder>& displayToken, + std::vector<int32_t>* outAllowedConfigs) = 0; }; // ---------------------------------------------------------------------------- @@ -415,6 +423,7 @@ public: ADD_REGION_SAMPLING_LISTENER, REMOVE_REGION_SAMPLING_LISTENER, SET_ALLOWED_DISPLAY_CONFIGS, + GET_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 3c52b105b..7e763fcd5 100644 --- a/libs/gui/include/gui/SurfaceComposerClient.h +++ b/libs/gui/include/gui/SurfaceComposerClient.h @@ -117,6 +117,12 @@ public: static status_t setAllowedDisplayConfigs(const sp<IBinder>& displayToken, const std::vector<int32_t>& allowedConfigs); + // Returns the allowed display configurations currently set. + // The allowedConfigs in a vector of indexes corresponding to the configurations + // returned from getDisplayConfigs(). + static status_t getAllowedDisplayConfigs(const sp<IBinder>& displayToken, + std::vector<int32_t>* outAllowedConfigs); + // Gets the list of supported color modes for the given display static status_t getDisplayColorModes(const sp<IBinder>& display, Vector<ui::ColorMode>* outColorModes); |