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/BufferQueueLayer.h b/services/surfaceflinger/BufferQueueLayer.h
index dfdb5c0..c6e0727 100644
--- a/services/surfaceflinger/BufferQueueLayer.h
+++ b/services/surfaceflinger/BufferQueueLayer.h
@@ -62,6 +62,11 @@
status_t setDefaultBufferProperties(uint32_t w, uint32_t h, PixelFormat format);
sp<IGraphicBufferProducer> getProducer() const;
+ void setSizeForTest(uint32_t w, uint32_t h) {
+ mDrawingState.active_legacy.w = w;
+ mDrawingState.active_legacy.h = h;
+ }
+
protected:
void gatherBufferInfo() override;