From 2109270e74a18585aceffc94d1758cee47bb4175 Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Tue, 12 Oct 2021 12:43:47 +0000 Subject: Revert "Second Patch for async RenderEngine" Revert "Fix vender implementation due to second patch of async R..." Revert submission 15644535-asyncRenderEngineV2 Reason for revert: Broke multiple tests Reverted Changes: I772122750:Fix vts cases due to function change for async ren... I615f2927d:Second Patch for async RenderEngine I3f47b8b67:Fix vender implementation due to second patch of a... Bug: 202803359 Bug: 202808760 Change-Id: Ib8ef68747621b7114cf2d1dfb856292674729744 --- .../surfaceflinger/TransactionCallbackInvoker.cpp | 32 ---------------------- 1 file changed, 32 deletions(-) (limited to 'services/surfaceflinger/TransactionCallbackInvoker.cpp') diff --git a/services/surfaceflinger/TransactionCallbackInvoker.cpp b/services/surfaceflinger/TransactionCallbackInvoker.cpp index 8fbf0b4d07..c1eb8966d1 100644 --- a/services/surfaceflinger/TransactionCallbackInvoker.cpp +++ b/services/surfaceflinger/TransactionCallbackInvoker.cpp @@ -154,38 +154,6 @@ status_t TransactionCallbackInvoker::addCallbackHandle(const sp& // destroyed the client side is dead and there won't be anyone to send the callback to. sp surfaceControl = handle->surfaceControl.promote(); if (surfaceControl) { - sp prevFence = nullptr; - - for (const auto& futureStruct : handle->previousReleaseFences) { - sp currentFence = sp::make(dup(futureStruct.get().drawFence)); - if (prevFence == nullptr && currentFence->getStatus() != Fence::Status::Invalid) { - prevFence = currentFence; - handle->previousReleaseFence = prevFence; - } else if (prevFence != nullptr) { - // If both fences are signaled or both are unsignaled, we need to merge - // them to get an accurate timestamp. - if (prevFence->getStatus() != Fence::Status::Invalid && - prevFence->getStatus() == currentFence->getStatus()) { - char fenceName[32] = {}; - snprintf(fenceName, 32, "%.28s", handle->name.c_str()); - sp mergedFence = Fence::merge(fenceName, prevFence, currentFence); - if (mergedFence->isValid()) { - handle->previousReleaseFence = mergedFence; - prevFence = handle->previousReleaseFence; - } - } else if (currentFence->getStatus() == Fence::Status::Unsignaled) { - // If one fence has signaled and the other hasn't, the unsignaled - // fence will approximately correspond with the correct timestamp. - // There's a small race if both fences signal at about the same time - // and their statuses are retrieved with unfortunate timing. However, - // by this point, they will have both signaled and only the timestamp - // will be slightly off; any dependencies after this point will - // already have been met. - handle->previousReleaseFence = currentFence; - } - } - } - handle->previousReleaseFences = {}; FrameEventHistoryStats eventStats(handle->frameNumber, handle->gpuCompositionDoneFence->getSnapshot().fence, handle->compositorTiming, handle->refreshStartTime, -- cgit v1.2.3-59-g8ed1b