diff options
| author | 2023-02-14 17:58:37 +0000 | |
|---|---|---|
| committer | 2023-02-14 17:58:37 +0000 | |
| commit | bd0b40589bc30305ea5812f33cb30e2cd4602bdb (patch) | |
| tree | 1fd89e2c312f94b85000ff2306a59e23f9dfdda5 /services/surfaceflinger/Layer.cpp | |
| parent | a8cafbfb32bf9e14e6df9a68e87f74906e1ca30a (diff) | |
| parent | 7fe69edeb671e90ea8a7a84e7f3ec181283b0dcd (diff) | |
Merge "SF: Pass latch time for bufferless surface frames"
Diffstat (limited to 'services/surfaceflinger/Layer.cpp')
| -rw-r--r-- | services/surfaceflinger/Layer.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp index 8c484f0039..704f336544 100644 --- a/services/surfaceflinger/Layer.cpp +++ b/services/surfaceflinger/Layer.cpp @@ -770,7 +770,7 @@ void Layer::transferAvailableJankData(const std::deque<sp<CallbackHandle>>& hand // transaction // ---------------------------------------------------------------------------- -uint32_t Layer::doTransaction(uint32_t flags) { +uint32_t Layer::doTransaction(uint32_t flags, nsecs_t latchTime) { ATRACE_CALL(); // TODO: This is unfortunate. @@ -798,23 +798,24 @@ uint32_t Layer::doTransaction(uint32_t flags) { mFlinger->mUpdateInputInfo = true; } - commitTransaction(mDrawingState); + commitTransaction(mDrawingState, latchTime); return flags; } -void Layer::commitTransaction(State&) { +void Layer::commitTransaction(State&, nsecs_t currentLatchTime) { // Set the present state for all bufferlessSurfaceFramesTX to Presented. The // bufferSurfaceFrameTX will be presented in latchBuffer. for (auto& [token, surfaceFrame] : mDrawingState.bufferlessSurfaceFramesTX) { if (surfaceFrame->getPresentState() != PresentState::Presented) { // With applyPendingStates, we could end up having presented surfaceframes from previous // states - surfaceFrame->setPresentState(PresentState::Presented); + surfaceFrame->setPresentState(PresentState::Presented, mLastLatchTime); mFlinger->mFrameTimeline->addSurfaceFrame(surfaceFrame); } } mDrawingState.bufferlessSurfaceFramesTX.clear(); + mLastLatchTime = currentLatchTime; } uint32_t Layer::clearTransactionFlags(uint32_t mask) { |