| 111 | } |
| 112 | |
| 113 | void EditorVisualProfiler::clear() { |
| 114 | int metric_size = EDITOR_GET("debugger/profiler_frame_history_size"); |
| 115 | metric_size = CLAMP(metric_size, 60, 10000); |
| 116 | frame_metrics.clear(); |
| 117 | frame_metrics.resize(metric_size); |
| 118 | last_metric = -1; |
| 119 | variables->clear(); |
| 120 | //activate->set_pressed(false); |
| 121 | |
| 122 | graph_limit = 1000.0f / CLAMP(int(EDITOR_GET("debugger/profiler_target_fps")), 1, 1000); |
| 123 | |
| 124 | updating_frame = true; |
| 125 | cursor_metric_edit->set_min(0); |
| 126 | cursor_metric_edit->set_max(0); |
| 127 | cursor_metric_edit->set_value(0); |
| 128 | updating_frame = false; |
| 129 | hover_metric = -1; |
| 130 | seeking = false; |
| 131 | } |
| 132 | |
| 133 | String EditorVisualProfiler::_get_time_as_text(float p_time) { |
| 134 | int dmode = display_mode->get_selected(); |