summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/Layer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'services/surfaceflinger/Layer.cpp')
-rw-r--r--services/surfaceflinger/Layer.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index dac09169c8..a29be22aa8 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -790,7 +790,7 @@ void Layer::transferAvailableJankData(const std::deque<sp<CallbackHandle>>& hand
// transaction
// ----------------------------------------------------------------------------
-uint32_t Layer::doTransaction(uint32_t flags, nsecs_t latchTime) {
+uint32_t Layer::doTransaction(uint32_t flags) {
ATRACE_CALL();
// TODO: This is unfortunate.
@@ -818,12 +818,12 @@ uint32_t Layer::doTransaction(uint32_t flags, nsecs_t latchTime) {
mFlinger->mUpdateInputInfo = true;
}
- commitTransaction(mDrawingState, latchTime);
+ commitTransaction(mDrawingState);
return flags;
}
-void Layer::commitTransaction(State&, nsecs_t currentLatchTime) {
+void Layer::commitTransaction(State&) {
// Set the present state for all bufferlessSurfaceFramesTX to Presented. The
// bufferSurfaceFrameTX will be presented in latchBuffer.
for (auto& [token, surfaceFrame] : mDrawingState.bufferlessSurfaceFramesTX) {
@@ -835,7 +835,6 @@ void Layer::commitTransaction(State&, nsecs_t currentLatchTime) {
}
}
mDrawingState.bufferlessSurfaceFramesTX.clear();
- mLastLatchTime = currentLatchTime;
}
uint32_t Layer::clearTransactionFlags(uint32_t mask) {
@@ -1381,7 +1380,7 @@ void Layer::addSurfaceFramePresentedForBuffer(
surfaceFrame->setAcquireFenceTime(acquireFenceTime);
surfaceFrame->setPresentState(PresentState::Presented, mLastLatchTime);
mFlinger->mFrameTimeline->addSurfaceFrame(surfaceFrame);
- mLastLatchTime = currentLatchTime;
+ updateLastLatchTime(currentLatchTime);
}
std::shared_ptr<frametimeline::SurfaceFrame> Layer::createSurfaceFrameForTransaction(
@@ -4077,6 +4076,10 @@ void Layer::setTrustedPresentationInfo(TrustedPresentationThresholds const& thre
}
}
+void Layer::updateLastLatchTime(nsecs_t latchTime) {
+ mLastLatchTime = latchTime;
+}
+
// ---------------------------------------------------------------------------
std::ostream& operator<<(std::ostream& stream, const Layer::FrameRate& rate) {