Skip to content
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

Use LibraryImport instead of DllImport on net7+ for better performance #2964

Closed
1 task done
Youssef1313 opened this issue Jul 31, 2024 · 2 comments
Closed
1 task done

Comments

@Youssef1313
Copy link
Contributor

Is your feature request related to a problem?

Performance

Describe the solution you would like

Update SkiaSharpGenerator to use LibraryImport when possible, e.g:

					writer.WriteLine($"\t\t#if NET7_0_OR_GREATER");
					writer.WriteLine($"\t\t[LibraryImport ({config.DllName})]");
					writer.WriteLine($"\t\t#else");
					writer.WriteLine($"\t\t[DllImport ({config.DllName}, CallingConvention = CallingConvention.Cdecl)]");
					writer.WriteLine($"\t\t#endif");

(Not sure if it will be that trivial)

Describe alternatives you have considered

N/A

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@Gillibald
Copy link
Contributor

#2917

@Youssef1313
Copy link
Contributor Author

Thanks. Closing as a duplicate of #2615 then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants