diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-03-30 22:09:24 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-03-30 22:09:24 +0300 |
commit | f44d3e83cc0333415ba0038550f436cb93f36914 (patch) | |
tree | 1a7b2b830c73ce7b6f84b2bcd310e0c8ee2eb710 /source/blender/editors/space_file/file_draw.c | |
parent | 963e48e1dfb09520369b9a3a31b4f57663651c21 (diff) |
UI: Perf: Add BLF batching for File browser and UI blocks.
This batch together most of the calls that can be batch together.
Diffstat (limited to 'source/blender/editors/space_file/file_draw.c')
-rw-r--r-- | source/blender/editors/space_file/file_draw.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c index 4bf377ddc1a..35e1558ef94 100644 --- a/source/blender/editors/space_file/file_draw.c +++ b/source/blender/editors/space_file/file_draw.c @@ -52,6 +52,8 @@ #include "BLT_translation.h" +#include "BLF_api.h" + #include "IMB_imbuf_types.h" #include "DNA_userdef_types.h" @@ -607,6 +609,8 @@ void file_draw_list(const bContext *C, ARegion *ar) } } + BLF_batching_start(); + for (i = offset; (i < numfiles) && (i < offset + numfiles_layout); i++) { unsigned int file_selflag; char path[FILE_MAX_LIBEXTRA]; @@ -736,6 +740,8 @@ void file_draw_list(const bContext *C, ARegion *ar) } } + BLF_batching_end(); + UI_block_end(C, block); UI_block_draw(C, block); |