diff options
author | Ady Abraham <adyabr@google.com> | 2019-05-08 14:50:56 -0700 |
---|---|---|
committer | Ady Abraham <adyabr@google.com> | 2019-05-17 17:12:15 +0000 |
commit | 8532d011118e863229bbbd78e247d11325ecbe6c (patch) | |
tree | 9621f9953b535d9d57fcb3b83a67b3e6b1dc6573 /libs/gui/include | |
parent | df542f63e1df9f5af21f683ec049646ab0c13711 (diff) | |
download | android_frameworks_native-8532d011118e863229bbbd78e247d11325ecbe6c.tar.gz android_frameworks_native-8532d011118e863229bbbd78e247d11325ecbe6c.tar.bz2 android_frameworks_native-8532d011118e863229bbbd78e247d11325ecbe6c.zip |
SurfaceFlinger: Add touch events to Scheduler
Add the notion of Touch Events to Scheduler to enhance the algorithm
to move to Performance refresh rate.
Scheduler selects Performance when:
- There is a touch event
- There is a buffer to HWC
This change also removes the behavior of Scheduler to move to Performance
on Choreographer callbacks.
Test: Switch between apps using gesture navigation
Bug: 131906818
Change-Id: I588cfc32449e87744e829dc7c5261a2e4151a8f8
Diffstat (limited to 'libs/gui/include')
-rw-r--r-- | libs/gui/include/gui/ISurfaceComposer.h | 11 | ||||
-rw-r--r-- | libs/gui/include/gui/SurfaceComposerClient.h | 10 |
2 files changed, 21 insertions, 0 deletions
diff --git a/libs/gui/include/gui/ISurfaceComposer.h b/libs/gui/include/gui/ISurfaceComposer.h index fd67754d0..e2f77365b 100644 --- a/libs/gui/include/gui/ISurfaceComposer.h +++ b/libs/gui/include/gui/ISurfaceComposer.h @@ -425,6 +425,16 @@ public: */ virtual status_t setDisplayBrightness(const sp<IBinder>& displayToken, float brightness) const = 0; + + /* + * Sends a power hint to the composer. This function is asynchronous. + * + * hintId + * hint id according to android::hardware::power::V1_0::PowerHint + * + * Returns NO_ERROR upon success. + */ + virtual status_t notifyPowerHint(int32_t hintId) = 0; }; // ---------------------------------------------------------------------------- @@ -477,6 +487,7 @@ public: GET_DISPLAY_BRIGHTNESS_SUPPORT, SET_DISPLAY_BRIGHTNESS, CAPTURE_SCREEN_BY_ID, + NOTIFY_POWER_HINT, // Always append new enum to the end. }; diff --git a/libs/gui/include/gui/SurfaceComposerClient.h b/libs/gui/include/gui/SurfaceComposerClient.h index a03883860..0e17c7b01 100644 --- a/libs/gui/include/gui/SurfaceComposerClient.h +++ b/libs/gui/include/gui/SurfaceComposerClient.h @@ -201,6 +201,16 @@ public: */ static status_t setDisplayBrightness(const sp<IBinder>& displayToken, float brightness); + /* + * Sends a power hint to the composer. This function is asynchronous. + * + * hintId + * hint id according to android::hardware::power::V1_0::PowerHint + * + * Returns NO_ERROR upon success. + */ + static status_t notifyPowerHint(int32_t hintId); + // ------------------------------------------------------------------------ // surface creation / destruction |