diff options
author | Matias N. Goldberg <dark_sylinc@yahoo.com.ar> | 2024-05-05 19:15:56 -0300 |
---|---|---|
committer | Matias N. Goldberg <dark_sylinc@yahoo.com.ar> | 2024-10-28 18:55:37 -0300 |
commit | aaa0e2fddfead4a31afddc07a26cd6af0c19dacd (patch) | |
tree | feb59f7fe37d206a354ef2108b498d0ae2ec3633 /platform/android/java_godot_io_wrapper.h | |
parent | 92e51fca7247c932f95a1662aefc28aca96e8de6 (diff) | |
download | redot-engine-aaa0e2fddfead4a31afddc07a26cd6af0c19dacd.tar.gz |
Add Swappy & Pre-Transformed Swapchain
- Adds Swappy for Android for stable frame pacing
- Implements pre-transformed Swapchain so that Godot's compositor is in
charge of rotating the screen instead of Android's compositor
(performance optimization for phones that don't have HW rotator)
============================
The work was performed by collaboration of TheForge and Google. I am
merely splitting it up into smaller PRs and cleaning it up.
Changes from original PR:
- Removed "display/window/frame_pacing/android/target_frame_rate" option
to use Engine::get_max_fps instead.
- Target framerate can be changed at runtime using Engine::set_max_fps.
- Swappy is enabled by default.
- Added documentation.
- enable_auto_swap setting is replaced with swappy_mode.
Diffstat (limited to 'platform/android/java_godot_io_wrapper.h')
-rw-r--r-- | platform/android/java_godot_io_wrapper.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/platform/android/java_godot_io_wrapper.h b/platform/android/java_godot_io_wrapper.h index 0a372641cb..903bdce4be 100644 --- a/platform/android/java_godot_io_wrapper.h +++ b/platform/android/java_godot_io_wrapper.h @@ -61,6 +61,7 @@ private: jmethodID _has_hardware_keyboard = 0; jmethodID _set_screen_orientation = 0; jmethodID _get_screen_orientation = 0; + jmethodID _get_internal_current_screen_rotation = 0; jmethodID _get_system_dir = 0; public: @@ -88,6 +89,7 @@ public: void set_vk_height(int p_height); void set_screen_orientation(int p_orient); int get_screen_orientation(); + int get_internal_current_screen_rotation(); String get_system_dir(int p_dir, bool p_shared_storage); }; |