From eb504880f18870346fdaa180e4dd2f58c8620f2f Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Sun, 22 Aug 2021 02:21:06 +0200 Subject: [PATCH] Document `Image.generate_mipmaps()` always running on the main thread (cherry picked from commit 30a88f464ba6e0dc08b7cc84029df0e50e1a75b6) --- doc/classes/Image.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml index 750ad8c8530..ed7f150dcd3 100644 --- a/doc/classes/Image.xml +++ b/doc/classes/Image.xml @@ -163,6 +163,7 @@ 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].