Skip to content

Remove old sprite code not used by text2d - #25665

Merged
alice-i-cecile merged 1 commit into
bevyengine:mainfrom
IceSentry:yeet_sprite_dead_code_text2d
Sep 5, 2026
Merged

Remove old sprite code not used by text2d#25665
alice-i-cecile merged 1 commit into
bevyengine:mainfrom
IceSentry:yeet_sprite_dead_code_text2d

Conversation

@IceSentry

Copy link
Copy Markdown
Contributor

Objective

  • The old sprite backend was kept around for text2d compatibility but a lot of now dead code was left in it.

Solution

  • Remove all the code unnecessary to render text2d.

Testing

  • I tested the testbed_2d and the text2d example

@IceSentry IceSentry added A-Rendering Drawing game state to the screen S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Sep 3, 2026
@github-project-automation github-project-automation Bot moved this to Needs SME Triage in Rendering Sep 3, 2026
/// PERF: storing an `AssetId` instead of `Handle<Image>` enables some optimizations (`ExtractedSprite` becomes `Copy` and doesn't need to be dropped)
pub image_handle_id: AssetId<Image>,
pub flip_x: bool,
pub flip_y: bool,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why is flip_x removed, but flip_y is not??

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Because flip_x was never used by any of the text2d code path but it does use flip_y

@alice-i-cecile alice-i-cecile added C-Code-Quality A section of code that is hard to understand or change S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Sep 4, 2026
@alice-i-cecile
alice-i-cecile added this pull request to the merge queue Sep 4, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 4, 2026
@alice-i-cecile
alice-i-cecile added this pull request to the merge queue Sep 4, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 4, 2026
@alice-i-cecile
alice-i-cecile added this pull request to the merge queue Sep 5, 2026
Merged via the queue into bevyengine:main with commit 7b061ad Sep 5, 2026
47 checks passed
@github-project-automation github-project-automation Bot moved this from Needs SME Triage to Done in Rendering Sep 5, 2026
ewmb7701 pushed a commit to ewmb7701/bevy that referenced this pull request Sep 5, 2026
# Objective

- The old sprite backend was kept around for text2d compatibility but a
lot of now dead code was left in it.

## Solution

- Remove all the code unnecessary to render text2d.

## Testing

- I tested the testbed_2d and the text2d example
joelawm pushed a commit to joelawm/bevy that referenced this pull request Sep 8, 2026
# Objective

- The old sprite backend was kept around for text2d compatibility but a
lot of now dead code was left in it.

## Solution

- Remove all the code unnecessary to render text2d.

## Testing

- I tested the testbed_2d and the text2d example
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Rendering Drawing game state to the screen C-Code-Quality A section of code that is hard to understand or change S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants