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: Rename BitmapData->BitmapRawData, wrap it in new BitmapData #18754

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

adrian17
Copy link
Collaborator

This does make bitmap_data.rs uglier (it now has three copies of fn height() and similar methods), but on the other hand:

  • The new names are clearer
  • Most two-phase construction and GcCell handling are abstracted away:
// before
let bitmap_data = BitmapData::new_with_pixels(...);
let bitmapdata_wrapper = BitmapDataWrapper::new(GcCell::new(mc, bitmap_data));
let bitmapdata_avm2 = BitmapDataObject::from_bitmap_data_internal(..., bitmapdata_wrapper);
// after
let bitmapdata = BitmapData::new_with_pixels(mc, ...);
let bitmapdata_avm2 = BitmapDataObject::from_bitmap_data_internal(..., bitmapdata);
  • It's a nice middle step towards future BitmapData refactors (including possibly data sharing), possibly without having to touch all these places again.

@adrian17 adrian17 added T-refactor Type: Refactor / Cleanup A-core Area: Core player, where no other category fits labels Nov 25, 2024
@adrian17 adrian17 added the waiting-on-review Waiting on review from a Ruffle team member label Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-core Area: Core player, where no other category fits T-refactor Type: Refactor / Cleanup waiting-on-review Waiting on review from a Ruffle team member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants