-
-
Notifications
You must be signed in to change notification settings - Fork 883
core: Remove GcCell
usage in MovieClipShared
#20310
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c6278e2
to
dd01076
Compare
c3789d5
to
6ec740c
Compare
237a074
to
201d0a0
Compare
772b382
to
929d059
Compare
0e1a193
to
1a01fa8
Compare
1a01fa8
to
46e6262
Compare
kjarosh
approved these changes
May 23, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
46e6262
to
8462b55
Compare
And refactor movieclip preloading logic by segregating mutable data into a separate GC-agnostic `MovieClipSharedMut` struct. This allows the removal of the convoluted static data cloning logic in `MovieClip::preload`.
Most of these do not need access to an actual MC instance; the only hold-out is AVM1's `do_init_action`.
8462b55
to
3275ef3
Compare
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Additionally, preloading now modifies the existing
MovieClipShared
instance instead of swapping a clone on eachpreload
call.This means that duplicating a partially-preloaded
MovieClip
will return a clip sharing the preload state. This seems "more correct" to me (as it means that both clips will properly finish preloading), but I haven't tested this in FP.EDIT: Added a further refactoring that moves most of the tag preloading methods to
MovieClipShared
, as they mostly don't need access to the actual MC instance.