Revert^2 "Second Patch for async RenderEngine"
Keep the change of Second Patch for async RenderEngine and fix the
regression
- remove the vector variables which is to store futureFence locally in
BufferStateLayer to get avoid fd leaking
- screenshots initiated from the app don't wait on the SF main thread.
2109270e74a18585aceffc94d1758cee47bb4175
Bug: 202843200
Bug: 202833127
Bug: 202808760
Test: Wembley PIN setting test, NexusLauncherOutOfProcTests
Change-Id: I87847d01e2e330ddec88272cd8608f0b78c0a2cd
diff --git a/services/surfaceflinger/TransactionCallbackInvoker.h b/services/surfaceflinger/TransactionCallbackInvoker.h
index 7e879e1..100dbfa 100644
--- a/services/surfaceflinger/TransactionCallbackInvoker.h
+++ b/services/surfaceflinger/TransactionCallbackInvoker.h
@@ -18,8 +18,9 @@
#include <condition_variable>
#include <deque>
-#include <queue>
+#include <future>
#include <mutex>
+#include <queue>
#include <thread>
#include <unordered_map>
#include <unordered_set>
@@ -28,6 +29,7 @@
#include <binder/IBinder.h>
#include <gui/ITransactionCompletedListener.h>
+#include <renderengine/RenderEngine.h>
#include <ui/Fence.h>
namespace android {
@@ -42,7 +44,9 @@
wp<IBinder> surfaceControl;
bool releasePreviousBuffer = false;
+ std::string name;
sp<Fence> previousReleaseFence;
+ std::vector<std::shared_future<renderengine::RenderEngineResult>> previousReleaseFences;
nsecs_t acquireTime = -1;
nsecs_t latchTime = -1;
uint32_t transformHint = 0;