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/interface/interface.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/interface/interface.c')
-rw-r--r-- | source/blender/editors/interface/interface.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index d6385276b1a..3fe0cdd5d4f 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -1426,6 +1426,8 @@ void UI_block_draw(const bContext *C, uiBlock *block) else if (block->panel) ui_draw_aligned_panel(&style, block, &rect, UI_panel_category_is_visible(ar)); + BLF_batching_start(); + /* widgets */ for (but = block->buttons.first; but; but = but->next) { if (!(but->flag & (UI_HIDDEN | UI_SCROLLED))) { @@ -1437,6 +1439,8 @@ void UI_block_draw(const bContext *C, uiBlock *block) ui_draw_but(C, ar, &style, but, &rect); } } + + BLF_batching_end(); /* restore matrix */ gpuPopProjectionMatrix(); |