-
Notifications
You must be signed in to change notification settings - Fork 543
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
Support ASP.NET Blazor Web Assembly Components #1811
Conversation
I'm somewhat surprised you're pushing 50 FPS with Blazor. I wasn't sure it could turn around frames that fast without AOT compilation. Pretty sweet! |
@RChrisCoble I can also get 60 now that I cleaned up some stuff. But... The trick is SkiaSharp is mainly a C++ library which is pre-AOT-ed. So you don't need AOT for anything except a bunch of pinvokes and a few lines of code. And then skia is just naturally fast. And the 60 FPS is the limit set by the browser ticker. It uses 60 FPS and I hook into it. I bet I can go faster if I used a setInterval or something. |
Very excited for this! Is there a reason SKCanvasView doesn't have the same |
@mattleibow Hi Matthew, this is an amazing news. |
@artemiusgreat you need to add the preview feed for skia: https://aka.ms/skiasharp-eap/index.json As soon as I can get all the dotnet bits updated (#1815) I will push to nuget.org. But, don't wait on that as CI has been iffy. |
From @artemiusgreat (#1815 (comment))
|
Let me have a look at this. Did you try the new VSMac preview? I wonder if there was some issue with the source gen in older IDEs. I know we had issues in the maui repo, but later versions seemed to have been much better. |
You may have an older SDK. I can get it to build and run via the CLI once I installed the later SDKS.
|
Just tested on the very latest of IDE builds, and I get an error there. A different error, so I am checking with the IDE team. Not sure why I would get an error in the IDE and not the CLI since they are using the same commands... my error log: https://gist.github.com/mattleibow/e2f0471a0dc644229213c8572d4535ef |
I've been trying to install VS 2022 on Mac for several days but appeared to be it's not as easy as in Windows because Mac users are required to request a link to download a new VS preview. The download link is not available directly. Maybe some licensing issues or something. Besides this, I have Visual Studio 2019, the latest SDKs, including .NET 6 Preview 7, and updated all Nuget packages including pre-releases. Nevertheless, VS isn't complaining about the latest features but about the basic
The version of the Skia is this one. The latest CLI didn't install for some reason. Executing commands that you sent I'm getting the error in red. Then, failing build. |
Hi @mattleibow , awesome stuff. Was checking out https://github.com/microcharts-dotnet/Microcharts last week and was hoping for the day we can run microcharts with blazor as I currently use it in Xamarin Forms. I assume this request with Skia makes that now possible as Microcharts just needs (.NET Standard 2.0 SkiaSharp ) ? |
Yep! |
It looks fantastic! |
Hello @mattleibow I don't think you saw my question so I'm obnoxiously reposting it:
IS this in fact a subtle way to drive people to use GL stuff and I should just stop being lazy? 😛 |
Nope! This is a pre-pre-preview PR. I am going to make both views do the same thing with a render loop. I was going for a canvas view is on-demand by default, but for the html/js stuff, there is no clean way to do a loop for managed code with all weird timers. So, I might as well do it right in js with the frame and then all is well. |
@davidwengier all done! I'll push another build to the preview feed as soon as it is done. Hopefully people are just making absolutely amazing blazor+wasm apps already :) |
hi @mattleibow, I'm getting the same issue Error message:
|
@anpin I totally missed this. Could you open a new issue for that? Often, closed issues are missed. |
Description of Change
Add support for Blazor on Web Assembly.
Bugs Fixed
API Changes
Behavioral Changes
PR Checklist
Getting Started
The build for this PR has been pushed to out preview feed: https://aka.ms/skiasharp-eap/index.json
You will also need the RC 2 .NET SDK:
All you need to do is install the
SkiaSharp.Views.Blazor
NuGet package!🔥