Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core: Use BitmapData instead of separate initial_data field #9143

Merged
merged 1 commit into from
Jan 14, 2023

Conversation

Aaron1011
Copy link
Member

Now that a Bitmap always stores a BitmapData, we can read the pixels directly from the BitmapData, instead of duplicating them in an initial_data field

@MrCheeze
Copy link
Contributor

This change does reduce memory use from 5 to 2-3 GB in ruffle_desktop, but unfortunately it still goes above 4GB in any web browser, meaning #9137 does not get fixed.

@MrCheeze
Copy link
Contributor

MrCheeze commented Jan 13, 2023

This change does reduce memory use from 5 to 2-3 GB in ruffle_desktop, but unfortunately it still goes above 4GB in any web browser, meaning #9137 does not get fixed.

Actually, although this PR does not fix Cascade on its own, it DOES fix Cascade when merged with #9134 (memory usage is 3GB on web with both PRs merged).

So I guess... either the optimizations of this PR don't apply to the webgl renderer for some reason; or else the wgpu renderer happens to have a lower memory footprint for unrelated reasons, and both optimizations combined are enough to bring cascade under the 4GB limit.

Now that a `Bitmap` always stores a `BitmapData`, we can read the pixels
directly from the `BitmapData`, instead of duplicating them in an
`initial_data` field
@Aaron1011 Aaron1011 merged commit 3a6c8d9 into ruffle-rs:master Jan 14, 2023
relrelb added a commit to relrelb/ruffle that referenced this pull request Feb 16, 2023
Since `initial_data` was removed from `Character::Bitmap` in ruffle-rs#9143,
it now holds a single field. Move back to an unnamed field, which
aligns with the other `Character` enum variants.
relrelb added a commit that referenced this pull request Feb 16, 2023
Since `initial_data` was removed from `Character::Bitmap` in #9143,
it now holds a single field. Move back to an unnamed field, which
aligns with the other `Character` enum variants.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants