diff options
author | 2020-01-16 21:18:46 +0000 | |
---|---|---|
committer | 2020-01-16 21:18:46 +0000 | |
commit | 92bd250eda0de9b0d3d966f285a8a75fcfd85149 (patch) | |
tree | 81b6b59e7beaf1d49a4c31f452fbe937e2c1e8d6 /libs/gui/SurfaceComposerClient.cpp | |
parent | 0dbbf7492c2816376129c8751f7e1ddd7c3bdf7f (diff) | |
parent | c84d09b6464242b1809ffb4f7faa5b2632f4a5e0 (diff) |
Merge "SF Generalization of Refresh Rates: Adding layer priority hint"
Diffstat (limited to 'libs/gui/SurfaceComposerClient.cpp')
-rw-r--r-- | libs/gui/SurfaceComposerClient.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libs/gui/SurfaceComposerClient.cpp b/libs/gui/SurfaceComposerClient.cpp index 5e259e258c..2ef33cf253 100644 --- a/libs/gui/SurfaceComposerClient.cpp +++ b/libs/gui/SurfaceComposerClient.cpp @@ -1192,6 +1192,22 @@ SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setColor } SurfaceComposerClient::Transaction& +SurfaceComposerClient::Transaction::setFrameRateSelectionPriority(const sp<SurfaceControl>& sc, + int32_t priority) { + layer_state_t* s = getLayerState(sc); + if (!s) { + mStatus = BAD_INDEX; + return *this; + } + + s->what |= layer_state_t::eFrameRateSelectionPriority; + s->frameRateSelectionPriority = priority; + + registerSurfaceControlForCallback(sc); + return *this; +} + +SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::addTransactionCompletedCallback( TransactionCompletedCallbackTakesContext callback, void* callbackContext) { auto listener = TransactionCompletedListener::getInstance(); |