summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/Layer.cpp
diff options
context:
space:
mode:
author Dominik Laskowski <domlaskowski@google.com> 2022-08-26 09:06:59 -0700
committer Dominik Laskowski <domlaskowski@google.com> 2022-09-08 08:48:21 -0700
commitf8734e014d3a5596be2edc6ee85dbda7589bb889 (patch)
treefd30cadac81cfd364477ef0c9247fc8ea7b32dbf /services/surfaceflinger/Layer.cpp
parentf2595446af5d9bf2ca4b2e5bf07dfbbd842e61ec (diff)
SF: Enforce thread safety of active mode access
Provide two RefreshRateConfigs APIs for retrieving the active mode: getActiveMode for access from the main thread (which does not need to lock nor copy), and getActiveModePtr for other threads. Bug: 241285191 Test: Build (-Wthread-safety) Change-Id: If156d85861ec2d82a394ba181314a6ba3048974f
Diffstat (limited to 'services/surfaceflinger/Layer.cpp')
-rw-r--r--services/surfaceflinger/Layer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index 47bd91e195..701071b36e 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -3947,7 +3947,7 @@ void Layer::onPostComposition(const DisplayDevice* display,
}
if (display) {
- const Fps refreshRate = display->refreshRateConfigs().getActiveMode()->getFps();
+ const Fps refreshRate = display->refreshRateConfigs().getActiveModePtr()->getFps();
const std::optional<Fps> renderRate =
mFlinger->mScheduler->getFrameRateOverride(getOwnerUid());