Skip to content

fix(DisplayLink): declare CACurrentMediaTime instead of importing QuartzCore - #1249

Closed
cristim wants to merge 1 commit into
OpenSwiftUIProject:mainfrom
cristim:rfc-displaylink-declaration
Closed

cristim wants to merge 1 commit into
OpenSwiftUIProject:mainfrom
cristim:rfc-displaylink-declaration

Conversation

@cristim

@cristim cristim commented Nov 4, 2026 •

Copy link
Copy Markdown

Summary

RFC, draft, unbuilt. Declare CACurrentMediaTime in DisplayLink.c instead of importing the QuartzCore umbrella; the file uses no other QuartzCore symbol and CFTimeInterval comes from CoreFoundation via DisplayLink.h.

The commit message says the umbrella import fails to compile on SDKs whose umbrella is Objective-C only. That was seen in an earlier build of my fork and not reproduced here; read it as unverified.

Verification

Run: cherry-picks cleanly onto current main (the original commit also changed Package.swift, split out as #1250, hence the shared source SHA). Not run: no compiler was available. CONTRIBUTING.md asks for an issue first for large work; this is one concern. Related RFC draft: #1246.

…rtzCore

DisplayLink.c only needs CACurrentMediaTime. Importing the QuartzCore
umbrella pulls Objective-C layer declarations into this C translation unit,
which does not compile on SDKs whose umbrella is Objective-C only. Declare
the one function the file uses.

(cherry picked from commit 2cf8efa)
@cristim

cristim commented Nov 4, 2026

Copy link
Copy Markdown
Author

Cold review: code clean (CFTimeInterval and the signature match). Body contradiction fixed; the commit message overclaim is disclosed in the body because the branch cannot be rewritten without a force push. Not compiled.

@Kyle-Ye Kyle-Ye closed this Nov 7, 2026
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.

2 participants