summaryrefslogtreecommitdiff
path: root/editor/editor_profiler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_profiler.cpp')
-rw-r--r--editor/editor_profiler.cpp26
1 files changed, 12 insertions, 14 deletions
diff --git a/editor/editor_profiler.cpp b/editor/editor_profiler.cpp
index 3ac4fcc21b..dd784c0980 100644
--- a/editor/editor_profiler.cpp
+++ b/editor/editor_profiler.cpp
@@ -175,7 +175,7 @@ void EditorProfiler::_update_plot() {
graph_image.resize(desired_len);
}
- PoolVector<uint8_t>::Write wr = graph_image.write();
+ uint8_t *wr = graph_image.ptrw();
const Color background_color = get_color("dark_color_2", "Editor");
// Clear the previous frame and set the background color.
@@ -342,8 +342,6 @@ void EditorProfiler::_update_plot() {
}
}
- wr.release();
-
Ref<Image> img;
img.instance();
img->create(w, h, 0, Image::FORMAT_RGBA8, graph_image);
@@ -688,12 +686,12 @@ EditorProfiler::EditorProfiler() {
activate = memnew(Button);
activate->set_toggle_mode(true);
activate->set_text(TTR("Start"));
- activate->connect("pressed", this, "_activate_pressed");
+ activate->connect_compat("pressed", this, "_activate_pressed");
hb->add_child(activate);
clear_button = memnew(Button);
clear_button->set_text(TTR("Clear"));
- clear_button->connect("pressed", this, "_clear_pressed");
+ clear_button->connect_compat("pressed", this, "_clear_pressed");
hb->add_child(clear_button);
hb->add_child(memnew(Label(TTR("Measure:"))));
@@ -703,7 +701,7 @@ EditorProfiler::EditorProfiler() {
display_mode->add_item(TTR("Average Time (sec)"));
display_mode->add_item(TTR("Frame %"));
display_mode->add_item(TTR("Physics Frame %"));
- display_mode->connect("item_selected", this, "_combo_changed");
+ display_mode->connect_compat("item_selected", this, "_combo_changed");
hb->add_child(display_mode);
@@ -712,7 +710,7 @@ EditorProfiler::EditorProfiler() {
display_time = memnew(OptionButton);
display_time->add_item(TTR("Inclusive"));
display_time->add_item(TTR("Self"));
- display_time->connect("item_selected", this, "_combo_changed");
+ display_time->connect_compat("item_selected", this, "_combo_changed");
hb->add_child(display_time);
@@ -723,7 +721,7 @@ EditorProfiler::EditorProfiler() {
cursor_metric_edit = memnew(SpinBox);
cursor_metric_edit->set_h_size_flags(SIZE_FILL);
hb->add_child(cursor_metric_edit);
- cursor_metric_edit->connect("value_changed", this, "_cursor_metric_changed");
+ cursor_metric_edit->connect_compat("value_changed", this, "_cursor_metric_changed");
hb->add_constant_override("separation", 8 * EDSCALE);
@@ -747,14 +745,14 @@ EditorProfiler::EditorProfiler() {
variables->set_column_title(2, TTR("Calls"));
variables->set_column_expand(2, false);
variables->set_column_min_width(2, 60 * EDSCALE);
- variables->connect("item_edited", this, "_item_edited");
+ variables->connect_compat("item_edited", this, "_item_edited");
graph = memnew(TextureRect);
graph->set_expand(true);
graph->set_mouse_filter(MOUSE_FILTER_STOP);
- graph->connect("draw", this, "_graph_tex_draw");
- graph->connect("gui_input", this, "_graph_tex_input");
- graph->connect("mouse_exited", this, "_graph_tex_mouse_exit");
+ graph->connect_compat("draw", this, "_graph_tex_draw");
+ graph->connect_compat("gui_input", this, "_graph_tex_input");
+ graph->connect_compat("mouse_exited", this, "_graph_tex_mouse_exit");
h_split->add_child(graph);
graph->set_h_size_flags(SIZE_EXPAND_FILL);
@@ -770,13 +768,13 @@ EditorProfiler::EditorProfiler() {
frame_delay->set_wait_time(0.1);
frame_delay->set_one_shot(true);
add_child(frame_delay);
- frame_delay->connect("timeout", this, "_update_frame");
+ frame_delay->connect_compat("timeout", this, "_update_frame");
plot_delay = memnew(Timer);
plot_delay->set_wait_time(0.1);
plot_delay->set_one_shot(true);
add_child(plot_delay);
- plot_delay->connect("timeout", this, "_update_plot");
+ plot_delay->connect_compat("timeout", this, "_update_plot");
plot_sigs.insert("physics_frame_time");
plot_sigs.insert("category_frame_time");