Loading libs/gui/BLASTBufferQueue.cpp +5 −1 Original line number Diff line number Diff line Loading @@ -270,6 +270,7 @@ void BLASTBufferQueue::update(const sp<SurfaceControl>& surface, uint32_t width, const bool surfaceControlChanged = !SurfaceControl::isSameSurface(mSurfaceControl, surface); if (surfaceControlChanged && mSurfaceControl != nullptr) { BQA_LOGD("Updating SurfaceControl without recreating BBQ"); mSetBufferBarrier = false; } // Always update the native object even though they might have the same layer handle, so we can Loading Loading @@ -708,8 +709,11 @@ status_t BLASTBufferQueue::acquireNextBufferLocked( mName.c_str(), status); mAppliedLastTransaction = true; mLastAppliedFrameNumber = bufferItem.mFrameNumber; mSetBufferBarrier = true; } else { if (mSetBufferBarrier) { t->setBufferHasBarrier(mSurfaceControl, mLastAppliedFrameNumber); } mAppliedLastTransaction = false; } Loading libs/gui/include/gui/BLASTBufferQueue.h +1 −0 Original line number Diff line number Diff line Loading @@ -230,6 +230,7 @@ private: ui::Size mSize GUARDED_BY(mMutex); ui::Size mRequestedSize GUARDED_BY(mMutex); int32_t mFormat GUARDED_BY(mMutex); bool mSetBufferBarrier GUARDED_BY(mMutex) = false; // Keep a copy of the current picture profile handle, so it can be moved to a new // SurfaceControl when BBQ migrates via ::update. Loading services/surfaceflinger/SurfaceFlinger.cpp +12 −2 Original line number Diff line number Diff line Loading @@ -4946,11 +4946,21 @@ TransactionHandler::TransactionReadiness SurfaceFlinger::transactionReadyBufferC " < %" PRId64, layer->name.c_str(), layer->barrierFrameNumber, s.bufferData->barrierFrameNumber); bool timeout = std::chrono::nanoseconds(flushState.queueProcessTime - transaction.postTime) > std::chrono::seconds(4); if (timeout) { TransactionTraceWriter::getInstance() .invoke("IgnoreBarrierDueToTimeout", /* overwrite= */ false); SFTRACE_FORMAT("IgnoreBarrierDueToTimeout %s", layer->name.c_str()); } else { ready = TransactionReadiness::NotReadyBarrier; return TraverseBuffersReturnValues::STOP_TRAVERSAL; } } } } // If backpressure is enabled and we already have a buffer to commit, keep // the transaction in the queue. Loading services/surfaceflinger/Tracing/TransactionProtoParser.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -76,6 +76,7 @@ perfetto::protos::TransactionState TransactionProtoParser::toProto( for (auto& mergedTransactionId : t.mergedTransactionIds) { proto.mutable_merged_transaction_ids()->Add(mergedTransactionId); } proto.set_apply_token(reinterpret_cast<uint64_t>(t.applyToken.get())); return proto; } Loading Loading
libs/gui/BLASTBufferQueue.cpp +5 −1 Original line number Diff line number Diff line Loading @@ -270,6 +270,7 @@ void BLASTBufferQueue::update(const sp<SurfaceControl>& surface, uint32_t width, const bool surfaceControlChanged = !SurfaceControl::isSameSurface(mSurfaceControl, surface); if (surfaceControlChanged && mSurfaceControl != nullptr) { BQA_LOGD("Updating SurfaceControl without recreating BBQ"); mSetBufferBarrier = false; } // Always update the native object even though they might have the same layer handle, so we can Loading Loading @@ -708,8 +709,11 @@ status_t BLASTBufferQueue::acquireNextBufferLocked( mName.c_str(), status); mAppliedLastTransaction = true; mLastAppliedFrameNumber = bufferItem.mFrameNumber; mSetBufferBarrier = true; } else { if (mSetBufferBarrier) { t->setBufferHasBarrier(mSurfaceControl, mLastAppliedFrameNumber); } mAppliedLastTransaction = false; } Loading
libs/gui/include/gui/BLASTBufferQueue.h +1 −0 Original line number Diff line number Diff line Loading @@ -230,6 +230,7 @@ private: ui::Size mSize GUARDED_BY(mMutex); ui::Size mRequestedSize GUARDED_BY(mMutex); int32_t mFormat GUARDED_BY(mMutex); bool mSetBufferBarrier GUARDED_BY(mMutex) = false; // Keep a copy of the current picture profile handle, so it can be moved to a new // SurfaceControl when BBQ migrates via ::update. Loading
services/surfaceflinger/SurfaceFlinger.cpp +12 −2 Original line number Diff line number Diff line Loading @@ -4946,11 +4946,21 @@ TransactionHandler::TransactionReadiness SurfaceFlinger::transactionReadyBufferC " < %" PRId64, layer->name.c_str(), layer->barrierFrameNumber, s.bufferData->barrierFrameNumber); bool timeout = std::chrono::nanoseconds(flushState.queueProcessTime - transaction.postTime) > std::chrono::seconds(4); if (timeout) { TransactionTraceWriter::getInstance() .invoke("IgnoreBarrierDueToTimeout", /* overwrite= */ false); SFTRACE_FORMAT("IgnoreBarrierDueToTimeout %s", layer->name.c_str()); } else { ready = TransactionReadiness::NotReadyBarrier; return TraverseBuffersReturnValues::STOP_TRAVERSAL; } } } } // If backpressure is enabled and we already have a buffer to commit, keep // the transaction in the queue. Loading
services/surfaceflinger/Tracing/TransactionProtoParser.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -76,6 +76,7 @@ perfetto::protos::TransactionState TransactionProtoParser::toProto( for (auto& mergedTransactionId : t.mergedTransactionIds) { proto.mutable_merged_transaction_ids()->Add(mergedTransactionId); } proto.set_apply_token(reinterpret_cast<uint64_t>(t.applyToken.get())); return proto; } Loading