summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--services/surfaceflinger/BufferStateLayer.cpp9
-rw-r--r--services/surfaceflinger/Layer.cpp4
-rw-r--r--services/surfaceflinger/Layer.h3
3 files changed, 5 insertions, 11 deletions
diff --git a/services/surfaceflinger/BufferStateLayer.cpp b/services/surfaceflinger/BufferStateLayer.cpp
index 579130a380..f30e1eb1c3 100644
--- a/services/surfaceflinger/BufferStateLayer.cpp
+++ b/services/surfaceflinger/BufferStateLayer.cpp
@@ -236,10 +236,6 @@ void BufferStateLayer::pushPendingState() {
bool BufferStateLayer::applyPendingStates(Layer::State* stateToCommit) {
mCurrentStateModified = mCurrentState.modified;
bool stateUpdateAvailable = Layer::applyPendingStates(stateToCommit);
- if (stateUpdateAvailable && mCallbackHandleAcquireTime != -1) {
- // Update the acquire fence time if we have a buffer
- mSurfaceFrame->setAcquireFenceTime(mCallbackHandleAcquireTime);
- }
mCurrentStateModified = stateUpdateAvailable && mCurrentStateModified;
mCurrentState.modified = false;
return stateUpdateAvailable;
@@ -612,11 +608,12 @@ bool BufferStateLayer::hasFrameUpdate() const {
}
std::optional<nsecs_t> BufferStateLayer::nextPredictedPresentTime() const {
- if (!getDrawingState().isAutoTimestamp || !mSurfaceFrame) {
+ const State& drawingState(getDrawingState());
+ if (!drawingState.isAutoTimestamp || !drawingState.bufferSurfaceFrameTX) {
return std::nullopt;
}
- return mSurfaceFrame->getPredictions().presentTime;
+ return drawingState.bufferSurfaceFrameTX->getPredictions().presentTime;
}
status_t BufferStateLayer::updateTexImage(bool& /*recomputeVisibleRegions*/, nsecs_t latchTime,
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index 6a28da30e7..237aaffa1f 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -1583,7 +1583,7 @@ std::shared_ptr<frametimeline::SurfaceFrame> Layer::createSurfaceFrameForTransac
surfaceFrame->setAcquireFenceTime(postTime);
const auto fps = mFlinger->mScheduler->getFrameRateOverride(getOwnerUid());
if (fps) {
- mSurfaceFrame->setRenderRate(*fps);
+ surfaceFrame->setRenderRate(*fps);
}
onSurfaceFrameCreated(surfaceFrame);
return surfaceFrame;
@@ -1598,7 +1598,7 @@ std::shared_ptr<frametimeline::SurfaceFrame> Layer::createSurfaceFrameForBuffer(
surfaceFrame->setActualQueueTime(queueTime);
const auto fps = mFlinger->mScheduler->getFrameRateOverride(getOwnerUid());
if (fps) {
- mSurfaceFrame->setRenderRate(*fps);
+ surfaceFrame->setRenderRate(*fps);
}
// TODO(b/178542907): Implement onSurfaceFrameCreated for BQLayer as well.
onSurfaceFrameCreated(surfaceFrame);
diff --git a/services/surfaceflinger/Layer.h b/services/surfaceflinger/Layer.h
index a1fdc3c2bd..687f473a79 100644
--- a/services/surfaceflinger/Layer.h
+++ b/services/surfaceflinger/Layer.h
@@ -1145,9 +1145,6 @@ protected:
// Window types from WindowManager.LayoutParams
const InputWindowInfo::Type mWindowType;
- // Can only be accessed with the SF state lock held.
- std::shared_ptr<frametimeline::SurfaceFrame> mSurfaceFrame;
-
// The owner of the layer. If created from a non system process, it will be the calling uid.
// If created from a system process, the value can be passed in.
uid_t mOwnerUid;