summaryrefslogtreecommitdiffstats
path: root/core/os/os.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/os/os.h')
-rw-r--r--core/os/os.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/core/os/os.h b/core/os/os.h
index 1652c1ed90..f2787d6381 100644
--- a/core/os/os.h
+++ b/core/os/os.h
@@ -52,6 +52,7 @@ class OS {
bool _keep_screen_on = true; // set default value to true, because this had been true before godot 2.0.
bool low_processor_usage_mode = false;
int low_processor_usage_mode_sleep_usec = 10000;
+ bool _delta_smoothing_enabled = false;
bool _verbose_stdout = false;
bool _debug_stdout = false;
String _local_clipboard;
@@ -75,6 +76,12 @@ class OS {
RemoteFilesystemClient default_rfs;
+ // For tracking benchmark data
+ bool use_benchmark = false;
+ String benchmark_file;
+ HashMap<String, uint64_t> start_benchmark_from;
+ Dictionary startup_benchmark_json;
+
protected:
void _set_logger(CompositeLogger *p_logger);
@@ -154,6 +161,9 @@ public:
virtual void set_low_processor_usage_mode_sleep_usec(int p_usec);
virtual int get_low_processor_usage_mode_sleep_usec() const;
+ void set_delta_smoothing(bool p_enabled);
+ bool is_delta_smoothing_enabled() const;
+
virtual Vector<String> get_system_fonts() const { return Vector<String>(); };
virtual String get_system_font_path(const String &p_font_name, int p_weight = 400, int p_stretch = 100, bool p_italic = false) const { return String(); };
virtual Vector<String> get_system_font_path_for_text(const String &p_font_name, const String &p_text, const String &p_locale = String(), const String &p_script = String(), int p_weight = 400, int p_stretch = 100, bool p_italic = false) const { return Vector<String>(); };
@@ -295,6 +305,15 @@ public:
virtual bool request_permissions() { return true; }
virtual Vector<String> get_granted_permissions() const { return Vector<String>(); }
+ // For recording / measuring benchmark data. Only enabled with tools
+ void set_use_benchmark(bool p_use_benchmark);
+ bool is_use_benchmark_set();
+ void set_benchmark_file(const String &p_benchmark_file);
+ String get_benchmark_file();
+ virtual void benchmark_begin_measure(const String &p_what);
+ virtual void benchmark_end_measure(const String &p_what);
+ virtual void benchmark_dump();
+
virtual void process_and_drop_events() {}
virtual Error setup_remote_filesystem(const String &p_server_host, int p_port, const String &p_password, String &r_project_path);