From df7c72558630e4b9e3fa50e3fda4ff8a5bed22e8 Mon Sep 17 00:00:00 2001 From: Robert Carr Date: Sat, 1 Jan 2022 19:17:48 -0800 Subject: [PATCH] DO NOT MERGE: Track SurfaceComposerClient changes surfaceControlStats now includes the acquire count. Bug: 197269223 Bug: 212846697 Test: Existing tests pass Change-Id: I29f2e9ba1c100a831be5eddce2c2a442d136d98e --- native/android/surface_control.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/native/android/surface_control.cpp b/native/android/surface_control.cpp index 693a027bd0e2d..d818ffc7c352d 100644 --- a/native/android/surface_control.cpp +++ b/native/android/surface_control.cpp @@ -298,7 +298,7 @@ void ASurfaceTransaction_setOnComplete(ASurfaceTransaction* aSurfaceTransaction, auto& aSurfaceControlStats = aSurfaceTransactionStats.aSurfaceControlStats; - for (const auto& [surfaceControl, latchTime, acquireTime, presentFence, previousReleaseFence, transformHint, frameEvents] : surfaceControlStats) { + for (const auto& [surfaceControl, latchTime, acquireTime, presentFence, previousReleaseFence, transformHint, frameEvents, ignore] : surfaceControlStats) { ASurfaceControl* aSurfaceControl = reinterpret_cast(surfaceControl.get()); aSurfaceControlStats[aSurfaceControl].acquireTime = acquireTime; aSurfaceControlStats[aSurfaceControl].previousReleaseFence = previousReleaseFence; @@ -650,7 +650,7 @@ void ASurfaceTransaction_setOnCommit(ASurfaceTransaction* aSurfaceTransaction, v for (const auto& [surfaceControl, latchTime, acquireTime, presentFence, previousReleaseFence, transformHint, - frameEvents] : surfaceControlStats) { + frameEvents, ignore] : surfaceControlStats) { ASurfaceControl* aSurfaceControl = reinterpret_cast(surfaceControl.get()); aSurfaceControlStats[aSurfaceControl].acquireTime = acquireTime; @@ -662,4 +662,4 @@ void ASurfaceTransaction_setOnCommit(ASurfaceTransaction* aSurfaceTransaction, v Transaction* transaction = ASurfaceTransaction_to_Transaction(aSurfaceTransaction); transaction->addTransactionCommittedCallback(callback, context); -} \ No newline at end of file +}