Live data from Hacker News

Skia: an open source 2D graphics library

skia.org

21–30 of 119 posts

Re: Skia: an open source 2D graphics library

#21
post #7

Earlier quoted context omitted.

Skia is probably the most popular 2D graphics library at the moment. I don't really know why this got on HN now. It's already extremely popular. I use it in a little WIP game engine. It's very pleasant, excellent little library. There's an online jsfiddle-esque demo here https://fiddle.skia.org/ if you want to try it out.

I have a little 2d game that I'd like to port over to Skia. What did you end up using to handle input and audio and other gamey things?

I would think SDL would be an easy cross-platform choice there.

Re: Skia: an open source 2D graphics library

#22

There is also a .NET binding for Windows and Xamarin: https://www.nuget.org/packages/SkiaSharp/

Has anyone used this? Are there any examples?

I’m converting a large desktop (CAD) app from GDI+ to SkiaSharp at the moment. Really liking the Api and the quality of the C# wrapper. Also maps very well to GDI concepts so a conversion is fairly painless.

Re: Skia: an open source 2D graphics library

#23
post #9

Also there is a Rust adapted version https://github.com/servo/skia , used on Servo

For a few things. These days most of Servo rendering is done on the GPU by WebRender. I think we only use Skia for canvas right now.

Hopefully we'll drop it altogether once Pathfinder is completed.

Re: Skia: an open source 2D graphics library

#25
post #4

Earlier quoted context omitted.

Skia is used by Chrome, Android, and Flutter at Google. I believe Adobe and Microsoft also use Skia in various products.

Doesn’t Microsoft have Direct2D for this sort of thing.

I think it's for Xamarin.

Re: Skia: an open source 2D graphics library

#26

I've used it to create a desktop port of http://diep.io/ . It's great (easy to use, reasonably documented), but it's a pretty big dependency (I don't remember exactly, but I think like 20 MB or so?). Since diep.io uses the canvas 2d API, porting was pretty straight forward. The performance on desktop is unsurprisingly many times faster than the browser.

What motivated your choice of Skia over WebGL?

Re: Skia: an open source 2D graphics library

#27

Earlier quoted context omitted.

Has anyone used this? Are there any examples?

I’m converting a large desktop (CAD) app from GDI+ to SkiaSharp at the moment. Really liking the Api and the quality of the C# wrapper. Also maps very well to GDI concepts so a conversion is fairly painless.

Cool. Are you able to share any more details? I'm guessing this isn't a standard WinForms app. What advantages does moving away from GDI+ give you?

Re: Skia: an open source 2D graphics library

#28

With all the fuss with "modern" text editors built on top of web engines, I feel the need to remind you all that one of the fastest graphical code editors that I have ever used — SublimeText — was built using Skia for the rendering. I believe many people have noticed how smooth the interface and most of the operations feel, a very good selling point if you want to build a GUI in the future.

If I understod correctly (which isn’t certain) Skia is also the rendering backend for chromium. Chromium is used as the rendering bits for electron. Electron is how you make these apps on “web engines”. So all those editors based on web engines likely render through Skia...

Skia is one part of Chromium; you also have Blink (browser engine) and V8 (js engine).

Re: Skia: an open source 2D graphics library

#29

With all the fuss with "modern" text editors built on top of web engines, I feel the need to remind you all that one of the fastest graphical code editors that I have ever used — SublimeText — was built using Skia for the rendering. I believe many people have noticed how smooth the interface and most of the operations feel, a very good selling point if you want to build a GUI in the future.

You should have a look at 4Coder: https://4coder.handmade.network/

Currently targeting the C++ language. The guy is writing it in C++ and is targeting Windows & Linux. I think he's using openGL.

Re: Skia: an open source 2D graphics library

#30

There is also a .NET binding for Windows and Xamarin: https://www.nuget.org/packages/SkiaSharp/

Has anyone used this? Are there any examples?

We used it for our image rendering server, and it worked really great at the beginning. The library is fast, and the API was easy to use, and it worked on Azure App Service without issues.

We eventually abandoned Skia though because it only operates with premultiplied alpha. Works ok if you render on opaque surfaces, but we needed to generate transparent PNGs, and in the allotted timeframe couldn't resolve some rendering differences.

Post reply on HN