diff options
Diffstat (limited to 'services/surfaceflinger/SurfaceFlinger.cpp')
| -rw-r--r-- | services/surfaceflinger/SurfaceFlinger.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index 3f52444c40..4d8dc94db5 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -2205,8 +2205,12 @@ bool SurfaceFlinger::updateLayerSnapshotsLegacy(VsyncId vsyncId, nsecs_t frameTi void SurfaceFlinger::updateLayerHistory(const frontend::LayerSnapshot& snapshot) { using Changes = frontend::RequestedLayerState::Changes; - if (snapshot.path.isClone() || - !snapshot.changes.any(Changes::FrameRate | Changes::Buffer | Changes::Animation)) { + if (snapshot.path.isClone()) { + return; + } + + if (!snapshot.changes.any(Changes::FrameRate | Changes::Buffer | Changes::Animation) && + (snapshot.clientChanges & layer_state_t::eDefaultFrameRateCompatibilityChanged) == 0) { return; } @@ -2226,6 +2230,11 @@ void SurfaceFlinger::updateLayerHistory(const frontend::LayerSnapshot& snapshot) it->second->recordLayerHistoryAnimationTx(layerProps); } + if (snapshot.clientChanges & layer_state_t::eDefaultFrameRateCompatibilityChanged) { + mScheduler->setDefaultFrameRateCompatibility(snapshot.sequence, + snapshot.defaultFrameRateCompatibility); + } + if (snapshot.changes.test(Changes::FrameRate)) { it->second->setFrameRateForLayerTree(snapshot.frameRate, layerProps); } |