Jonah Williams 36789c6b19 [Impeller] dont increment shared_ptr when tracked object is already tracked. (flutter/engine#56153)
By passing the shared_ptrs to TrackedObjectsVK by value, we will always require at least a decrement of the shared_ptr count, and possibly an increment too. 

Since for most cases the tracked object has already been tracked, passing by const ref results in no increment or decrement.

Ignoring the time value, since this is a flamegraph, we can see almost all time spent tracking is spent on shared_ptr decrement:

![image](https://github.com/user-attachments/assets/aeae405b-1e5a-4d97-a9a3-b7668cec0714)
2024-10-28 16:24:16 +00:00
..