[Bf-blender-cvs] [7ef8a49ad5b] blender2.8: DRW: Indent profiler timings.

Clément Foucault noreply at git.blender.org
Thu Aug 10 15:48:16 CEST 2017


Commit: 7ef8a49ad5b119b3a08e1313eec051e320dcc3d2
Author: Clément Foucault
Date:   Wed Aug 9 22:34:26 2017 +0200
Branches: blender2.8
https://developer.blender.org/rB7ef8a49ad5b119b3a08e1313eec051e320dcc3d2

DRW: Indent profiler timings.

===================================================================

M	source/blender/draw/intern/draw_manager_profiling.c

===================================================================

diff --git a/source/blender/draw/intern/draw_manager_profiling.c b/source/blender/draw/intern/draw_manager_profiling.c
index bca9e50da99..2b913bcbb8d 100644
--- a/source/blender/draw/intern/draw_manager_profiling.c
+++ b/source/blender/draw/intern/draw_manager_profiling.c
@@ -231,12 +231,12 @@ void DRW_stats_draw(rcti *rect)
 		time_ms = MIN2(time_ms, 999.0);
 		time_percent = MIN2(time_percent, 100.0);
 
+		BLI_snprintf(stat_string, sizeof(stat_string), "%s", timer->name);
+		BLF_draw_default_ascii(rect->xmin + (1 + timer->lvl) * U.widget_unit, rect->ymax - v * U.widget_unit, 0.0f, stat_string, sizeof(stat_string));
 		BLI_snprintf(stat_string, sizeof(stat_string), "%.2fms", time_ms);
-		BLF_draw_default_ascii(rect->xmin + 1 * U.widget_unit, rect->ymax - v * U.widget_unit, 0.0f, stat_string, sizeof(stat_string));
+		BLF_draw_default_ascii(rect->xmin + (13 + timer->lvl) * U.widget_unit, rect->ymax - v * U.widget_unit, 0.0f, stat_string, sizeof(stat_string));
 		BLI_snprintf(stat_string, sizeof(stat_string), "%.0f", time_percent);
-		BLF_draw_default_ascii(rect->xmin + 4 * U.widget_unit, rect->ymax - v * U.widget_unit, 0.0f, stat_string, sizeof(stat_string));
-		BLI_snprintf(stat_string, sizeof(stat_string), "%s", timer->name);
-		BLF_draw_default_ascii(rect->xmin + (6 + timer->lvl) * U.widget_unit, rect->ymax - v * U.widget_unit, 0.0f, stat_string, sizeof(stat_string));
+		BLF_draw_default_ascii(rect->xmin + (17 + timer->lvl) * U.widget_unit, rect->ymax - v * U.widget_unit, 0.0f, stat_string, sizeof(stat_string));
 		v++;
 	}
 }
\ No newline at end of file




More information about the Bf-blender-cvs mailing list