1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-18 14:21:41 +00:00

-Ability to debug video memory usage

-Small fix to xml saver (swapping > and <)
This commit is contained in:
Juan Linietsky
2015-10-21 09:50:44 -03:00
parent f6a790d58c
commit b59c86f6f9
18 changed files with 271 additions and 7 deletions

View File

@@ -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();