Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2018-04-06 15:30:20 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-04-06 15:30:20 +0300
commit39b654f4ff123e3e9bc345b25d4883df4de4ad5e (patch)
tree530e6c669f6a74ca1375841a2e05b11175c72d5b /source/blender/editors/interface/interface.c
parent21113ad8343c8ce80508aac08c5afbc2aa9dd2e7 (diff)
UI: Perf: Use widget base batching
Overall 10% more performance on general UI drawing time. This commit can introduce ordering problem on some elements. In this case you need to flush the widget cache to ensure the element that is going to be drawn is drawn on top of any widget base. To flush the cache use UI_widgetbase_draw_cache_flush. This is already done for BLF and Icons.
Diffstat (limited to 'source/blender/editors/interface/interface.c')
-rw-r--r--source/blender/editors/interface/interface.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index 0c786874180..12ee1ad35a1 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -1429,6 +1429,7 @@ void UI_block_draw(const bContext *C, uiBlock *block)
BLF_batch_draw_begin();
UI_icon_draw_cache_begin();
+ UI_widgetbase_draw_cache_begin();
/* widgets */
for (but = block->buttons.first; but; but = but->next) {
@@ -1442,6 +1443,7 @@ void UI_block_draw(const bContext *C, uiBlock *block)
}
}
+ UI_widgetbase_draw_cache_end();
UI_icon_draw_cache_end();
BLF_batch_draw_end();