[sf] protect against out of order transactions
If the client submits transactions out of order, we could end up
in a situation where a frame barrier will never be satisfied and
bring down the client. Fix this by being more resiliant to out of
order transactions.
Bug: 272189296
Test: repro steps from bug
Change-Id: I781b7751bdd6259fc164692248734c0cb268c238
diff --git a/services/surfaceflinger/FrontEnd/RequestedLayerState.h b/services/surfaceflinger/FrontEnd/RequestedLayerState.h
index 216e95f..f15f023 100644
--- a/services/surfaceflinger/FrontEnd/RequestedLayerState.h
+++ b/services/surfaceflinger/FrontEnd/RequestedLayerState.h
@@ -111,6 +111,8 @@
ui::LayerStack layerStackToMirror = ui::INVALID_LAYER_STACK;
uint32_t touchCropId = UNASSIGNED_LAYER_ID;
uint32_t bgColorLayerId = UNASSIGNED_LAYER_ID;
+ uint64_t barrierFrameNumber = 0;
+ uint32_t barrierProducerId = 0;
// book keeping states
bool handleAlive = true;