1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-25 15:37:42 +00:00
Commit Graph

1668 Commits

Author SHA1 Message Date
Thaddeus Crews
a2aefab4c7 Merge pull request #106486 from BlueCube3310/image-ch-detect-fix
Image: Fix detecting color channels
2025-05-19 08:01:40 -05:00
BlueCube3310
0f9986470a Image: Fix detecting color channels 2025-05-16 12:47:57 +02:00
Lukas Tenbrink
3207066e19 Add Memory::alloc_static_zeroed to allocate memory that's filled with zeroes.
This is generally faster than `malloc` followed by `memset` / loop-set to 0.
2025-05-13 01:57:05 +02:00
aaronp64
8fb3697916 Avoid single character String allocations when appending characters
Removed calls to String::chr() when appending characters to Strings in Expression, Resource, and VariantParser, to avoid creating temporary Strings for each character.  Also updated the Resource case to resize String up front, since size is known.
2025-05-12 17:35:42 -04:00
Thaddeus Crews
ba710dfde3 Merge pull request #106170 from IphStich/fix-typed-dictionary
Fix for debugging typed dictionaries
2025-05-09 11:29:18 -05:00
Elise
057759d413 Fix for debugging typed dictionaries 2025-05-08 21:11:23 +10:00
Fabio Alessandrelli
2c789788c0 mbedTLS: Fix concurrency issues with TLS
When we first integrated mbedTLS, we decided not to enable
MBEDTLS_THREADING_C (which adds mutex locking to calls modifying the
state), and instead to simply create separate contexts ("states") for
each connection.

This worked fine until recently.
Sadly, mbedTLS 3 added a global state for the new PSA crypto
functionalities (which are required to support TLSv1.3).
This results in TLSv1.3 connections to access and modify the global
state concurrently when running in threads.

This commit enables MBEDTLS_THREADING_C, and MBEDTLS_THREADING_C_ALT to
provide a generic Godot implementation using the engine Mutex class.
2025-05-08 11:45:00 +02:00
Thaddeus Crews
0ce3d75c20 Merge pull request #93783 from aaronp64/json_stringify_performance
Improve `JSON::stringify` performance
2025-05-07 12:48:28 -05:00
aaronp64
f13b4b760a Improve JSON::stringify performance
- Changed stringify to call static function _stringify directly, instead of creating JSON object
- Changed colon and end_statement from String to const char * to avoid extra allocations in each _stringify call
- Pass result String reference to each _stringify call to append to instead of allocating new String in each call

These changes make JSON::stringify around 2-3x faster in most cases
2025-05-06 18:27:32 -04:00
Thaddeus Crews
579feb387c Core: Add [[nodiscard]] to string-like classes 2025-05-06 12:23:41 -05:00
Thaddeus Crews
4cb030d6bf Merge pull request #106089 from mihe/rogue-newlines
Fix empty lines being added for errors with no script backtrace
2025-05-06 08:38:04 -05:00
Thaddeus Crews
7efe897343 Merge pull request #106085 from clayjohn/texture-decompress-import
Fix loading BPTC/ASTC textures on devices that don't support them
2025-05-06 08:38:04 -05:00
Thaddeus Crews
5bc01f2994 Merge pull request #105080 from beicause/basisu-ktx2-settings
BasisU: Use KTX2 format and add import options to configure encoder
2025-05-05 11:24:20 -05:00
Mikael Hermansson
31b90246e7 Fix empty lines being added for errors with no script backtrace 2025-05-05 13:27:21 +02:00
clayjohn
2b3923880a Continue checking for a texture decompression path even if end of import file is not reached 2025-05-05 00:19:32 -07:00
LuoZhihao
237597b01f BasisU: Use KTX2 format and add import options to configure encoder 2025-05-03 01:45:38 +08:00
Thaddeus Crews
01fc9aee6c Core: Modernize C headers with C++ equivalents 2025-05-02 08:23:01 -05:00
kobewi
5af4bef46f Inline static variables (part 1) 2025-04-29 18:10:44 +02:00
Thaddeus Crews
f8a8d6cf04 Merge pull request #105700 from dementive/config-file-get-improvement
Improve ConfigFile get_sections and get_section_keys by returning Vector<String>
2025-04-27 19:21:31 -05:00
Thaddeus Crews
3947cbe3b2 Merge pull request #104386 from Repiteo/core/cpp-math
Core: Replace C math headers with C++ equivalents
2025-04-27 19:21:22 -05:00
dementive
b8e44a0000 Improve ConfigFile get_sections and get_section_keys by returning Vector<String> 2025-04-24 20:10:31 -04:00
Thaddeus Crews
28089c40c1 Merge pull request #91006 from reduz/live-backtrace
Ability to print and log script backtraces
2025-04-24 17:18:52 -05:00
reduz
d1dcb40d56 Ability to print and log script backtraces
Co-authored-by: Mikael Hermansson <mikael@hermansson.io>
2025-04-24 18:54:41 +02:00
RedMser
a96e8ac62c Remove old path remaps system
Unused in public repositories, deprecated for over 6 years, and the
replacement system is well-tested by now.
2025-04-23 15:48:33 +02:00
Thaddeus Crews
ad40939b6f Core: Replace C math headers with C++ equivalents
- Minor restructuring to ensure `math_funcs.h` is the central point for math functions
2025-04-16 15:49:02 -05:00
Thaddeus Crews
d236bd8633 Merge pull request #99543 from KoBeWi/using_rng_to_destroy_rng
Add `create_id_for_path()` to ResourceUID
2025-04-11 09:51:12 -05:00
Thaddeus Crews
0964badc05 Merge pull request #105210 from nikitalita/gdsoftclass-fa-da
Add GDSOFTCLASS to FileAccess and DirAccess derived classes
2025-04-11 09:51:08 -05:00
kobewi
ff1f040893 Add create_id_for_path() to ResourceUID 2025-04-11 00:53:34 +02:00
Thaddeus Crews
94282d88f9 Core: Use Math namespace for constants 2025-04-10 16:29:30 -05:00
Thaddeus Crews
c67b9a43e3 Merge pull request #100086 from erodozer/multipart-ext-import
Support multi dot extensions in import plugins
2025-04-10 10:18:18 -05:00
A Thousand Ships
889410dcda Add String::replace_char(s) methods for performance and convenience 2025-04-10 13:08:45 +02:00
nikitalita
2d0ae77719 add GDSOFTCLASS to FileAccess and DirAccess derived classes 2025-04-09 11:52:50 -07:00
Thaddeus Crews
ec675fc329 Merge pull request #100333 from YYF233333/reduce_list
Use `LocalVector` instead of `List` as arg of `Dictionary::get_key_list`
2025-04-09 08:51:45 -05:00
Thaddeus Crews
217d1c6d2f Merge pull request #105178 from bruvzg/endianess_notes
Remove misleading and incorrect notes about endianness. Fix FileAccess and StreamPeer not doing what name suggests.
2025-04-09 08:51:42 -05:00
Pāvels Nadtočajevs
bd98aad3fa Remove misleading and incorrect notes about endianness. Fix FileAccess and StreamPeer not doing what name suggests. 2025-04-09 11:01:25 +03:00
Lukas Tenbrink
fbe64ffb45 Change get_class_static to return StringName.
Use that static `get_class_static` for `_get_class_namev` to avoid duplication.
2025-04-08 23:25:05 +02:00
Yufeng Ying
f7e4987d0e Dictionary::get_key_list use LocalVector instead of List. 2025-04-09 02:46:24 +08:00
Lukas Tenbrink
68f4502a5b Fix FileAccessCompressed claiming one byte more than it actually has.
Add a unit test for fastlz compressed file access.
2025-04-08 15:19:58 +02:00
Thaddeus Crews
0fbb22c095 Merge pull request #104432 from YYF233333/dict_iter2
Do not iterate `Dictionary` with `Dictionary::keys()`
2025-04-07 08:43:33 -05:00
Thaddeus Crews
5edb235018 CI: Bump various pre-commit hooks 2025-04-07 08:23:35 -05:00
Yufeng Ying
8ae16699c5 Do not use Dictionary::keys() for Dictionary iteration. 2025-04-05 18:42:13 +08:00
Thaddeus Crews
207a2b6472 Core: Integrate warning suppression macro helpers 2025-04-03 10:13:46 -05:00
Yufeng Ying
4f4031a675 Replace size() == 0 with is_empty(). 2025-04-02 19:18:43 +08:00
Thaddeus Crews
abd565eb19 Merge pull request #104844 from Ivorforce/gdsoftclass
Add and require `GDSOFTCLASS` for `Object` subclasses that want to cast but do not use `GDCLASS`.
2025-03-31 19:02:03 -05:00
Lukas Tenbrink
fa0a3c9c6e Add and require GDSOFTCLASS for Object subclasses that want to cast but do not use GDCLASS. 2025-03-31 20:49:50 +02:00
Thaddeus Crews
64f80ca0e9 Merge pull request #104810 from kiroxas/utf8_cleanup
Replace `append_utfx` with direct `String::utfx`
2025-03-31 12:03:44 -05:00
Kiro
23129a66ed Replace append_utfx with direct String::utfx 2025-03-30 19:56:38 +02:00
BlueCube3310
647b99c6d0 Image: Fix typo at _set_color_at_ofs with FORMAT_RGB565 2025-03-29 17:51:31 +01:00
Thaddeus Crews
152c14b053 Merge pull request #104597 from bruvzg/path_check
Implement `DirAccess.is_equivalent` method.
2025-03-29 10:16:34 -05:00
Thaddeus Crews
780cf03051 Merge pull request #104556 from Ivorforce/string-extend-instead-of-parse
Use `append_` instead of `parse_` for `String` methods.
2025-03-29 10:16:33 -05:00