X Tutup
Skip to content

Don't redraw invisible CanvasItems#90401

Merged
Repiteo merged 1 commit intogodotengine:masterfrom
KoBeWi:I_wonder_how_much_this_breaks
Oct 24, 2025
Merged

Don't redraw invisible CanvasItems#90401
Repiteo merged 1 commit intogodotengine:masterfrom
KoBeWi:I_wonder_how_much_this_breaks

Conversation

@KoBeWi
Copy link
Member

@KoBeWi KoBeWi commented Apr 8, 2024

This PR improves 2D performance by ignoring redraw callback of invisible CanvasItemts. It's especially relevant for the editor, e.g. active AnimatedSprite will no longer cause redraw if you are in script editor.

}

RenderingServer::get_singleton()->canvas_item_clear(get_canvas_item());
//todo updating = true - only allow drawing here
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what this TODO is about. It seems to have been resolved since forever.

@KoBeWi KoBeWi force-pushed the I_wonder_how_much_this_breaks branch from 4bedb78 to 7feb601 Compare August 20, 2025 18:46
@KoBeWi
Copy link
Member Author

KoBeWi commented Aug 20, 2025

Ok I removed the viewport part. It can be done in a separate PR, if ever.

@KoBeWi KoBeWi marked this pull request as ready for review August 20, 2025 18:46
@KoBeWi KoBeWi requested a review from a team as a code owner August 20, 2025 18:46
Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally on various 2D demo projects with low-processor mode enabled, it works as expected.

Code looks good to me.

@KoBeWi KoBeWi force-pushed the I_wonder_how_much_this_breaks branch from 7feb601 to 6abfa4b Compare August 23, 2025 12:27
@Repiteo Repiteo modified the milestones: 4.x, 4.6 Oct 24, 2025
@Repiteo Repiteo removed the request for review from a team October 24, 2025 15:40
@Repiteo Repiteo merged commit fbf1c72 into godotengine:master Oct 24, 2025
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Oct 24, 2025

Thanks!

@KoBeWi KoBeWi deleted the I_wonder_how_much_this_breaks branch October 24, 2025 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

X Tutup