diff options
author | Juan Linietsky <reduzio@gmail.com> | 2015-10-21 09:50:44 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2015-10-21 09:50:44 -0300 |
commit | b59c86f6f953ce6957bccbcc1ec6f3ce4c55572d (patch) | |
tree | 39a74205feb03436beacf8c4dcf9d4fd70f2e344 /core/script_debugger_remote.h | |
parent | f6a790d58c596773466437140f6d7e2a6a29e5e7 (diff) | |
download | redot-engine-b59c86f6f953ce6957bccbcc1ec6f3ce4c55572d.tar.gz |
-Ability to debug video memory usage
-Small fix to xml saver (swapping > and <)
Diffstat (limited to 'core/script_debugger_remote.h')
-rw-r--r-- | core/script_debugger_remote.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/core/script_debugger_remote.h b/core/script_debugger_remote.h index c2642782a9..973fa23212 100644 --- a/core/script_debugger_remote.h +++ b/core/script_debugger_remote.h @@ -34,6 +34,7 @@ #include "io/stream_peer_tcp.h" #include "io/packet_peer.h" #include "list.h" + class ScriptDebuggerRemote : public ScriptDebugger { struct Message { @@ -42,6 +43,8 @@ class ScriptDebuggerRemote : public ScriptDebugger { Array data; }; + + Ref<StreamPeerTCP> tcp_client; Ref<PacketPeerStream> packet_peer_stream; @@ -90,6 +93,7 @@ class ScriptDebuggerRemote : public ScriptDebugger { RequestSceneTreeMessageFunc request_scene_tree; void *request_scene_tree_ud; + void _send_video_memory(); LiveEditFuncs *live_edit_funcs; ErrorHandlerList eh; @@ -98,6 +102,20 @@ class ScriptDebuggerRemote : public ScriptDebugger { public: + struct ResourceUsage { + + String path; + String format; + String type; + RID id; + int vram; + bool operator<(const ResourceUsage& p_img) const { return vram==p_img.vram ? id<p_img.id : vram > p_img.vram; } + }; + + typedef void (*ResourceUsageFunc)(List<ResourceUsage>*); + + static ResourceUsageFunc resource_usage_func; + Error connect_to_host(const String& p_host,uint16_t p_port); virtual void debug(ScriptLanguage *p_script,bool p_can_continue=true); virtual void idle_poll(); |