summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-02-07 14:08:15 +0100
committerRémi Verschelde <rverschelde@gmail.com>2023-02-07 14:08:15 +0100
commit1cd66a76fcb78ef4f54c801b2bc112a4b5418ae1 (patch)
tree8744cf1dc880f825509070269ed1bf82f993f5d3 /editor
parent5386289ee2d7af990030f3d2a3c06d8b530cb05a (diff)
parent31a4a0002e566cbb28a2160fde1567eb75496cd0 (diff)
Merge pull request #72827 from RandomShaper/fix_slow_step
Pace debugger draw requests
Diffstat (limited to 'editor')
-rw-r--r--editor/debugger/script_editor_debugger.cpp6
-rw-r--r--editor/debugger/script_editor_debugger.h1
2 files changed, 6 insertions, 1 deletions
diff --git a/editor/debugger/script_editor_debugger.cpp b/editor/debugger/script_editor_debugger.cpp
index 32952a367d..304beec681 100644
--- a/editor/debugger/script_editor_debugger.cpp
+++ b/editor/debugger/script_editor_debugger.cpp
@@ -308,6 +308,7 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
String error = p_data[1];
bool has_stackdump = p_data[2];
breaked = true;
+ can_request_idle_draw = true;
can_debug = can_continue;
_update_buttons_state();
_set_reason_text(error, MESSAGE_ERROR);
@@ -378,6 +379,8 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
vmem_total->set_tooltip_text(TTR("Bytes:") + " " + itos(total));
vmem_total->set_text(String::humanize_size(total));
+ } else if (p_msg == "servers:drawn") {
+ can_request_idle_draw = true;
} else if (p_msg == "stack_dump") {
DebuggerMarshalls::ScriptStackDump stack;
stack.deserialize(p_data);
@@ -843,8 +846,9 @@ void ScriptEditorDebugger::_notification(int p_what) {
msg.push_back(cam->get_far());
_put_msg("scene:override_camera_3D:transform", msg);
}
- if (breaked) {
+ if (breaked && can_request_idle_draw) {
_put_msg("servers:draw", Array());
+ can_request_idle_draw = false;
}
}
diff --git a/editor/debugger/script_editor_debugger.h b/editor/debugger/script_editor_debugger.h
index a0c420522a..1659bbee8d 100644
--- a/editor/debugger/script_editor_debugger.h
+++ b/editor/debugger/script_editor_debugger.h
@@ -155,6 +155,7 @@ private:
bool breaked = false;
bool can_debug = false;
bool move_to_foreground = true;
+ bool can_request_idle_draw = false;
bool live_debug;