Commit 17307955d5e8e10886d71cdbdaa24122af409508

Yuxin Hu 2025-09-30T18:08:18

Vulkan: Add a threshold for RefCountedEventRecycler::mEventsToReset Surface Flinger process is not guaranteed to call Renderer::flushOutsideRPCommands(), in that case RefCountedEventRecycler::mEventsToReset is never cleaned up and send back to RefCountedEventRecycler::mEventsToReuse list, which causes file descriptors leaking. This change adds a threshold for the number of items in RefCountedEventRecycler::mEventsToReset. If the threshold is reached, don't add item to RefCountedEventRecycler::mEventsToReset, destroy the items instead. Bug: b/440066521 Change-Id: If4aa0b14ab15e70f192f380e3b9707b405dd6fcb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/7001562 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Yuxin Hu <yuxinhu@google.com>