-
Notifications
You must be signed in to change notification settings - Fork 58
Add RenderBoxView and RBLayer integration #711
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
base: main
Are you sure you want to change the base?
Conversation
🤖 Augment PR SummarySummary: This PR introduces RenderBox-backed drawing infrastructure and updates RenderBox integration points. Changes:
Technical Notes: The new RenderBox path is partially stubbed (several methods still call 🤖 Was this summary useful? React with 👍 or 👎 |
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.
| self.options = options | ||
| super.init(frame: .zero) | ||
| isOpaque = options.isOpaque | ||
| layer.contentsFormat = options.caLayerContentsFormat |
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.
On macOS, NSView.layer can be nil unless the view is layer-backed (e.g. wantsLayer = true), so touching layer.contentsFormat (and later layer as! CGDrawingLayer) risks a crash if this view is constructed outside the platform view factory. (This same assumption about layer being present also applies to RenderBoxView.)
🤖 Was this useful? React with 👍 or 👎
|
|
||
| override func didMoveToWindow() { | ||
| guard let window else { return } | ||
| layer.contentsScale = window.screen.scale |
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.
No description provided.