SF: Create layers with layerid
When recreating layer states from transaction traces
we need to create layers with a specific layer id.
Add the layer id as part of LayerCreationArgs and pass
the struct around instead of individual args.
Test: presubmit
Bug: 200284593
Change-Id: I029cdb5362d1926deaf2ce64f70a1882a418705b
diff --git a/services/surfaceflinger/MonitoredProducer.cpp b/services/surfaceflinger/MonitoredProducer.cpp
index 6b2d745..df76f50 100644
--- a/services/surfaceflinger/MonitoredProducer.cpp
+++ b/services/surfaceflinger/MonitoredProducer.cpp
@@ -33,13 +33,7 @@
mFlinger(flinger),
mLayer(layer) {}
-MonitoredProducer::~MonitoredProducer() {
- // Remove ourselves from SurfaceFlinger's list. We do this asynchronously
- // because we don't know where this destructor is called from. It could be
- // called with the mStateLock held, leading to a dead-lock (it actually
- // happens).
- mFlinger->removeGraphicBufferProducerAsync(onAsBinder());
-}
+MonitoredProducer::~MonitoredProducer() {}
status_t MonitoredProducer::requestBuffer(int slot, sp<GraphicBuffer>* buf) {
return mProducer->requestBuffer(slot, buf);