-
Notifications
You must be signed in to change notification settings - Fork 3.5k
[video_player] Use CADisplayLink on macOS 14.0+ #9533
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
[video_player] Use CADisplayLink on macOS 14.0+ #9533
Conversation
Marks the CVDisplayLink-based implementation that was previously used on macOS in all cases with deprecation suppressions, and switches macOS 14+ to share the CADisplayLink-based implementation that is currently used for iOS. Fixes flutter/flutter#171391
jmagman
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.
Thanks for jumping on this.
| @end | ||
|
|
||
| // An implementation of FVPDisplayLink using CADisplayLink. | ||
| @interface FVPCADisplayLink : NSObject <FVPDisplayLink> |
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.
Nit: It's hard to see the difference between FVPCADisplayLink and FVPCVDisplayLink. Could we name it FVPCoreAnimationDisplayLink? That seems outrageously long. If not, what you have is fine.
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.
I renamed FVPCVDisplayLink to FVPCoreVideoDisplayLink so that they are visually distinct, but it's the legacy one that's really long.
| @interface FVPDisplayLink () | ||
| @interface FVPCADisplayLink () | ||
| // The underlying display link implementation. | ||
| @property(nonatomic) CADisplayLink *displayLink; |
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.
- NOTE | [OSX] xcodebuild: /Volumes/Work/s/w/ir/x/w/packages/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPCADisplayLink.m:19:1: note: annotate 'onDisplayLink:' with an availability attribute to silence this warning
- WARN | [OSX] xcodebuild: /Volumes/Work/s/w/ir/x/w/packages/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPCADisplayLink.m:31:24: warning: 'CADisplayLink' is only available on macOS 14.0 or newer [-Wunguarded-availability-new]
- NOTE | [OSX] xcodebuild: /Volumes/Work/s/w/ir/x/w/packages/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPCADisplayLink.m:31:1: note: annotate 'onDisplayLink:' with an availability attribute to silence this warning
- WARN | [OSX] xcodebuild: /Volumes/Work/s/w/ir/x/w/packages/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPCADisplayLink.m:40:22: warning: 'CADisplayLink' is only available on macOS 14.0 or newer [-Wunguarded-availability-new]
- NOTE | [OSX] xcodebuild: /Volumes/Work/s/w/ir/x/w/packages/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPCADisplayLink.m:38:12: note: annotate '' with an availability attribute to silence this warning
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.
Oops, I meant to go back and figure out annotations once I had everything working.
flutter/packages@471bfd3...3dc682d 2025-07-01 [email protected] [video_player] Use CADisplayLink on macOS 14.0+ (flutter/packages#9533) 2025-06-30 49699333+dependabot[bot]@users.noreply.github.com [dependabot]: Bump exoplayer_version from 1.4.1 to 1.5.1 in /packages/video_player/video_player_android/android (flutter/packages#8414) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [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
…r#171458) flutter/packages@471bfd3...3dc682d 2025-07-01 [email protected] [video_player] Use CADisplayLink on macOS 14.0+ (flutter/packages#9533) 2025-06-30 49699333+dependabot[bot]@users.noreply.github.com [dependabot]: Bump exoplayer_version from 1.4.1 to 1.5.1 in /packages/video_player/video_player_android/android (flutter/packages#8414) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [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
Marks the CVDisplayLink-based implementation that was previously used on macOS in all cases with deprecation suppressions, and switches macOS 14+ to share the CADisplayLink-based implementation that is currently used for iOS. Fixes flutter/flutter#171391 ## Pre-Review Checklist [^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
…r#171458) flutter/packages@471bfd3...3dc682d 2025-07-01 [email protected] [video_player] Use CADisplayLink on macOS 14.0+ (flutter/packages#9533) 2025-06-30 49699333+dependabot[bot]@users.noreply.github.com [dependabot]: Bump exoplayer_version from 1.4.1 to 1.5.1 in /packages/video_player/video_player_android/android (flutter/packages#8414) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [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
Marks the CVDisplayLink-based implementation that was previously used on macOS in all cases with deprecation suppressions, and switches macOS 14+ to share the CADisplayLink-based implementation that is currently used for iOS.
Fixes flutter/flutter#171391
Pre-Review Checklist
[shared_preferences]pubspec.yamlwith an appropriate new version according to the pub versioning philosophy, or I have commented below to indicate which version change exemption this PR falls under1.CHANGELOG.mdto add a description of the change, following repository CHANGELOG style, or I have commented below to indicate which CHANGELOG exemption this PR falls under1.///).Footnotes
Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2 ↩3