diff options
| author | 2023-09-29 17:03:45 -0700 | |
|---|---|---|
| committer | 2023-10-02 21:30:18 -0700 | |
| commit | 80e8cfe3d73baecc749dba0de0bd7f96c17a5eec (patch) | |
| tree | af92ff64307f4cade1154cc3588585c09e658a51 /services/surfaceflinger/SurfaceFlinger.cpp | |
| parent | ddba9342cf79ea67328a845bb1b99635b2cbd00e (diff) | |
[sf-newfe] update default frame rate compatibility
Bug: 300701739
Test: presubmit
Change-Id: I3dbfd8d7ef6fe801d4d750c1828d09da511ce283
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); } |