File changed.
Preview size limit exceeded, changes collapsed.
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
When buffers are discarded by SurfaceFlinger clients, the memory should be free'd immediately. This includes clearing references to them from within the implementation of Composer HAL, specifically in cache slots associated with the layer. Since there is no HAL API to clear the slot directly, prior to writing any other buffer to the layer, we set the layer's buffer multiple times to a placeholder buffer, using each of the slot numbers that need to be cleared. This replaces the reference to the client-discarded buffer inside Composer HAL with a reference to the placeholder buffer, causing the reference count to drop, allowing the buffer memory to be freed. Bug: 258196272 Test: atest OutputLayerUncacheBufferTest Change-Id: Id85482e8859490566f0eedbd8d8729c47a7349fb
File changed.
Preview size limit exceeded, changes collapsed.