-
Notifications
You must be signed in to change notification settings - Fork 554
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
Fix iOS Simulator performance with Metal #3156
Conversation
/rebase |
adef99c
to
be55cee
Compare
/azp run |
Azure Pipelines could not run because the pipeline triggers exclude this branch/path. |
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 this PR and catching this special case!
The DeviceInfo
type is a .NET MAUI Essentials type and can't be used here, but we can copy the implementation:
bool IsSimulator =>
#if __MACCATALYST__ || __MACOS__
false;
#else
ObjCRuntime.Runtime.Arch == Arch.SIMULATOR;
#endif
And then use this as part of the if.
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.
Catalyst has same settings as iOS here, MacOS+Simulator have them different
source/SkiaSharp.Views/SkiaSharp.Views/Platform/Apple/SKMetalView.cs
Outdated
Show resolved
Hide resolved
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.
yay lets go
This comes from a new synced branch.
Had iOS simulator lagging on M1 at 9 fps with SKGLView, so had to adjust its platform-related code for iOS to unlock 60 fps.
Just followed Apple guidelines for simulator: https://developer.apple.com/documentation/metal/developing-metal-apps-that-run-in-simulator?language=objc
replacing
SampleCount = 1;
(no MSAA) insideSKMetalView
with:Works fine in DrawnUi now, wanted to share.