Curves: Port legacy curve viewport drawing to the new data-block
Instead of using `CurveEval` to draw the curve wire edges, use
the new `Curves` data-block, which is already built as part of
an object's evaluated geometry set whenever there is a
`CurveComponent`.
This means that we can remove `Curve`'s temporary ownership
of `CurveEval` for drawing (added in 9ec12c26f1),
which caused a memory leak as described in T96498.
In my testing this improved performance by around 1.5x during
viewport playback, back to the performance of 3.1 before the
curve data structure transition started.
The next step of using the GPU to do the final curve evaluation
for the viewport is described in T96455, but is unrelated.
Differential Revision: https://developer.blender.org/D14551
This commit is contained in:
@@ -123,8 +123,6 @@ static void curve_free_data(ID *id)
|
||||
MEM_SAFE_FREE(curve->str);
|
||||
MEM_SAFE_FREE(curve->strinfo);
|
||||
MEM_SAFE_FREE(curve->tb);
|
||||
|
||||
delete curve->curve_eval;
|
||||
}
|
||||
|
||||
static void curve_foreach_id(ID *id, LibraryForeachIDData *data)
|
||||
|
||||
Reference in New Issue
Block a user