Merge pull request #51969 from Calinou/doc-image-generate-mipmaps-no-threading

Document `Image.generate_mipmaps()` always running on the main thread
This commit is contained in:
K. S. Ernest (iFire) Lee 2021-08-25 11:17:23 -07:00 committed by GitHub
commit b3ada9cb1a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -180,6 +180,7 @@
<argument index="0" name="renormalize" type="bool" default="false" /> <argument index="0" name="renormalize" type="bool" default="false" />
<description> <description>
Generates mipmaps for the image. Mipmaps are precalculated lower-resolution copies of the image that are automatically used if the image needs to be scaled down when rendered. They help improve image quality and performance when rendering. This method returns an error if the image is compressed, in a custom format, or if the image's width/height is [code]0[/code]. Generates mipmaps for the image. Mipmaps are precalculated lower-resolution copies of the image that are automatically used if the image needs to be scaled down when rendered. They help improve image quality and performance when rendering. This method returns an error if the image is compressed, in a custom format, or if the image's width/height is [code]0[/code].
[b]Note:[/b] Mipmap generation is done on the CPU, is single-threaded and is [i]always[/i] done on the main thread. This means generating mipmaps will result in noticeable stuttering during gameplay, even if [method generate_mipmaps] is called from a [Thread].
</description> </description>
</method> </method>
<method name="get_data" qualifiers="const"> <method name="get_data" qualifiers="const">