summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/SurfaceFlinger.cpp
diff options
context:
space:
mode:
author Ady Abraham <adyabr@google.com> 2024-07-26 03:42:05 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2024-07-26 03:42:05 +0000
commit88d5540f587348b4abe8a4582821c13eef9d4369 (patch)
treefadb85522152cc4256f9e15f6eee573fecc37ccb /services/surfaceflinger/SurfaceFlinger.cpp
parent0673502ebcd4690b15b5ed7732ee1e49ef514d7f (diff)
parented1283a514bae8b2a7c289b994206bb7a9d5c847 (diff)
Merge "SF: fix a few bugs with FrameTargeter storing N fences" into main
Diffstat (limited to 'services/surfaceflinger/SurfaceFlinger.cpp')
-rw-r--r--services/surfaceflinger/SurfaceFlinger.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 22a899300d..e7582b43d6 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -2620,7 +2620,7 @@ bool SurfaceFlinger::commit(PhysicalDisplayId pacesetterId,
}
}
- if (pacesetterFrameTarget.isFramePending()) {
+ if (pacesetterFrameTarget.wouldBackpressureHwc()) {
if (mBackpressureGpuComposition || pacesetterFrameTarget.didMissHwcFrame()) {
if (FlagManager::getInstance().vrr_config()) {
mScheduler->getVsyncSchedule()->getTracker().onFrameMissed(
@@ -2913,6 +2913,9 @@ CompositeResultsPerDisplay SurfaceFlinger::composite(
// Now that the current frame has been presented above, PowerAdvisor needs the present time
// of the previous frame (whose fence is signaled by now) to determine how long the HWC had
// waited on that fence to retire before presenting.
+ // TODO(b/355238809) `presentFenceForPreviousFrame` might not always be signaled (e.g. on
+ // devices
+ // where HWC does not block on the previous present fence). Revise this assumtion.
const auto& previousPresentFence = pacesetterTarget.presentFenceForPreviousFrame();
mPowerAdvisor->setSfPresentTiming(TimePoint::fromNs(previousPresentFence->getSignalTime()),