At first glance this appears to be a hackWith tasks like T73993 and D6678, since `DRW_manager` isthere is a need to used primarily for rendering the snap system in Gizmos.
Furthermore `DRW_drawdata_get` and` DRW_drawdata_ensure` are located in a file inside an `"intern"` folderBut for this, it is important to find a way to know if the object's geometry has changed before reusing its snap_cache.
But if we want to use the snap system in Gizmos, it is important to find a way to know if the object's geometry has changed before reusing its snap_cache.
I looked for solutions with depsgraph or checking the operators that are called, but none is as efficient when using a `"DrawData"`.
`DrawData::recalc` is lake a flag that accumulates the changes made to an object.
The only change tested in the patch is `ID_RECALC_GEOMETRY`The solution was to create a `snap_cache` in `Object::runtime` that is freed whenever the geometry changes.
Benefits:
- Freedom to use the snap API without worrying about changes in the object's geometry.
Disadvantages:
- A DrawData follows the rest of the object's life, even though it is no longer used for snapping.
This disadvantage can be resolved by creating a function that removes a specific DrawData. (I did not implement this in order to avoid major changes(None that worth mentioning).