UI: Perf: Batch horizontal scrollers numbers together.

This commit is contained in:
Clément Foucault 2018-04-08 16:57:39 +02:00
parent 651ea84471
commit ccbc14d995
1 changed files with 5 additions and 1 deletions

View File

@ -1892,7 +1892,9 @@ void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *v
/* draw numbers in the appropriate range */
if (dfac > 0.0f) {
float h = 0.1f * UI_UNIT_Y + (float)(hor.ymin);
BLF_batch_draw_begin();
for (; fac < hor.xmax - 0.5f * U.widget_unit; fac += dfac, val += grid->dx) {
/* make prints look nicer for scrollers */
@ -1919,6 +1921,8 @@ void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *v
break;
}
}
BLF_batch_draw_end();
}
}
}