Hi,
I am developing a new SwiftUI app. Running under OSX, I see very high cpu usage (I am generating lots of gpu based updates which shouldn't affect the cpu).
I have used the profiler to ensure my swift property updates are minimal, yet the cpu usage is high coming from SwiftUI.
It seems the high cpu usage is coming from NSAppearance, specifically, CUICopyMeasurements - for a single button??? But the swift updates don't show any buttons being updating
Post
Replies
Boosts
Views
Activity
I received the attached crash report. The problem is that the crash report does not contain the abort reason - it appears to be thrown in the GCD library with no additional information.
Is it a possible deadlock?
2023-02-15_02-40-23.0077_+0100-94015bd052c4005658221a5e6279f28a75b9e92c.crash
Any ideas?
As the developer of Seashore, using
[[NSGraphicsContext currentContext] setImageInterpolation:NSImageInterpolationNone];
no longer works as expected in Big Sur on a Retina display. The exact build works fine in Catalina.
Small images seem to be first scaled using Medium or High interpolation to 2x, then scaled use 'None' to the desired size - causing blurriness.
This the code to display and scale the image:
[[NSGraphicsContext currentContext] setImageInterpolation:NSImageInterpolationNone];
[image drawInRect:alignedRect fromRect:copy operation:NSCompositeSourceOver fraction:1.0 respectFlipped:TRUE hints:NULL];
Any ideas for a fix?