Commit af73a7eb4a6e63c2c986e5555dc3d0aff1509348

Charlie Lao 2024-10-18T17:19:29

Vulkan: Add WeakPtr to mirror std::weak_ptr This is a follow up from previous CL crrev.com/c/5938947. Because of pool eviction is based on reference count, there is need to have a weak pointer to the reference counted pool that does not add an extra reference count. This CL adds WeakPtr that works similarly to std::weak_ptr, and replaced direct RefCountedDescriptorPool pointer with WeakPtr wrapper. This is safer than RefCountedDescriptorPool in a way that it does not allow modification of underline reference count. Also the use of WeakPtr has been reduced to minimum in this CL. Bug: angleproject:372268711 Change-Id: Idd6fa77432a9351269c968c961785a7cf5fab50c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5944061 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com>