-
Notifications
You must be signed in to change notification settings - Fork 6k
macOS: ARC bridge casts for FlutterMetalTexture.user_data #56518
Conversation
In `[FlutterSurface asFlutterMetalTexture]` we return a `FlutterMetalTexture` whose `user_data` field holds a void* reference to the associated `FlutterSurface`. For conistency with other parts of the codebase, this now uses ARC bridge casts to perform the additional retain and release of the associated surface rather than CoreFoundataion functions `CFBridgingRetain` and `CFBridigingRelease`. Also migrates the code to initialise and immediately return the struct using field designators, and reorders the assignments to be in the declaration order specified in embedder.h as required by the C++ spec. No changes to tests since this introduces no semantic change. Issue: flutter/flutter#137801
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group. |
|
test-exempt: code refactor with no semantic change |
stuartmorgan-g
left a comment
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
…158541) flutter/engine@877abb9...08348c9 2024-11-12 [email protected] [Linux] Configure depth and stencil framebuffer attachments needed for Impeller (flutter/engine#56516) 2024-11-12 [email protected] macOS: ARC bridge casts for FlutterMetalTexture.user_data (flutter/engine#56518) 2024-11-12 [email protected] [Impeller] prevent no-op backend from throwing exceptions during image decoding (flutter/engine#56522) 2024-11-12 [email protected] Roll Dart SDK from 69170fac244c to 5f42ef8f15d5 (4 revisions) (flutter/engine#56539) 2024-11-12 [email protected] Roll Fuchsia Linux SDK from BajfrJuYeyWvnBhuM... to z-cm2nR0aJ4lXfwZ0... (flutter/engine#56538) 2024-11-12 [email protected] Roll Skia from aa099ff91e2f to 7d5c206fc873 (6 revisions) (flutter/engine#56541) 2024-11-12 [email protected] [Impeller] In canvas_unittests, only create an MSAA offscreen texture if the platform supports MSAA (flutter/engine#56542) 2024-11-12 [email protected] [iOS] Fix slider semantics node answer to accessibility activate (flutter/engine#56427) Also rolling transitive DEPS: fuchsia/sdk/core/linux-amd64 from BajfrJuYeyWv to z-cm2nR0aJ4l If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…gine#56518) In `[FlutterSurface asFlutterMetalTexture]` we return a `FlutterMetalTexture` whose `user_data` field holds a `void*` reference to the associated `FlutterSurface`. For conistency with other parts of the codebase, this now uses ARC bridge casts to perform the additional retain and release of the associated surface rather than CoreFoundation functions `CFBridgingRetain` and `CFBridigingRelease`. In FlutterEngine, for example: https://github.com/flutter/engine/blob/67eb4ae000de830545670ef5de4cd08930a8ef2a/shell/platform/darwin/macos/framework/Source/FlutterEngine.mm#L648-L664 Also migrates the code to initialise and immediately return the struct using field designators, and reorders the assignments to be in the declaration order specified in embedder.h as required by the C++ spec. No changes to tests since this introduces no semantic change. Issue: flutter#137801 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
In
[FlutterSurface asFlutterMetalTexture]we return aFlutterMetalTexturewhoseuser_datafield holds avoid*reference to the associatedFlutterSurface.For conistency with other parts of the codebase, this now uses ARC bridge casts to perform the additional retain and release of the associated surface rather than CoreFoundation functions
CFBridgingRetainandCFBridigingRelease. In FlutterEngine, for example:engine/shell/platform/darwin/macos/framework/Source/FlutterEngine.mm
Lines 648 to 664 in a672f97
Also migrates the code to initialise and immediately return the struct using field designators, and reorders the assignments to be in the declaration order specified in embedder.h as required by the C++ spec.
No changes to tests since this introduces no semantic change.
Issue: flutter/flutter#137801
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.