diff options
author | Jeroen Bakker <jbakker> | 2020-06-22 22:44:18 +0300 |
---|---|---|
committer | Jeroen Bakker <j.bakker@atmind.nl> | 2020-06-22 22:46:04 +0300 |
commit | 2fdca5bd1981cddad16715598b4892a2c6099e2f (patch) | |
tree | 69853ccb8f442a58fce086e88adccf78ff9b96a4 /source/blender/editors/screen/area.c | |
parent | 9335daac2a368ad137156f6e656f3654b4db07b9 (diff) |
Refactoring: View2DScrollers memory allocation
View2DScrollers used the memory manager to allocate memory. This isn't a
problem but in a upcoming change the scrollers will be drawn more often
than it used to (See {D8066}). To limit the number of allocations and
frees this patch will use the stack for allocation.
Reviewed By: Campbell Barton
Differential Revision: https://developer.blender.org/D8076
Diffstat (limited to 'source/blender/editors/screen/area.c')
-rw-r--r-- | source/blender/editors/screen/area.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index 1adf7f84bbf..63366044f88 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -2795,9 +2795,7 @@ void ED_region_panels_draw(const bContext *C, ARegion *region) mask_buf.xmax -= UI_PANEL_CATEGORY_MARGIN_WIDTH; mask = &mask_buf; } - View2DScrollers *scrollers = UI_view2d_scrollers_calc(v2d, mask); - UI_view2d_scrollers_draw(v2d, scrollers); - UI_view2d_scrollers_free(scrollers); + UI_view2d_scrollers_draw(v2d, mask); } void ED_region_panels_ex( |