[Bf-blender-cvs] [ccbc14d995a] blender2.8: UI: Perf: Batch horizontal scrollers numbers together.
Clément Foucault
noreply at git.blender.org
Sun Apr 8 18:25:52 CEST 2018
Commit: ccbc14d995a4de2609125435ad108b6e17739e46
Author: Clément Foucault
Date: Sun Apr 8 16:57:39 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBccbc14d995a4de2609125435ad108b6e17739e46
UI: Perf: Batch horizontal scrollers numbers together.
===================================================================
M source/blender/editors/interface/view2d.c
===================================================================
diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c
index 6d39a66e123..375711194a3 100644
--- a/source/blender/editors/interface/view2d.c
+++ b/source/blender/editors/interface/view2d.c
@@ -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();
}
}
}
More information about the Bf-blender-cvs
mailing list