Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is very impressive. Have you benchmarked it against core graphics on a Mac? I believe they've done a similar thing - performing the render on Metal


CoreGraphics is pure CPU rasterizer, similar to GDI+.

Sciter (https://sciter.com) on MacOS uses Skia/OpenGL by default with fallback to CoreGraphics.

It is possible to configure Sciter to use CoreGraphics on MacOS to compare these two on the same UI by using

    SciterSetOption(NULL, SCITER_SET_GFX_LAYER, GFX_LAYER_CG);
I think it is safe to say that Skia/OpenGL is 5-10 times more performant than CG on typical UI tasks.


Interesting, thanks - I remember hearing at one of the WWDC that Coregraphics got a 10x speed improvement using metal. I just read the fine print - it seems draw calls only have a 10x speed improvement, I assume because they render through a layer of some sort. The CA* libraries may use metal - animation and layers, which I guess is where the 10x draw call improvement comes in maybe.

Some discussion here https://arstechnica.com/civis/viewtopic.php?t=1285571 , though a lot of guessing.


Metal is definitely used extensively in CoreAnimation, and Apple UI tends to rely on that - relatively slow (and memory hungry) rendering of layer content, which is then composited very smoothly and nicely in CA.

They might use it for other stuff like glyph compositing (I think this is one reason they got rid of RGB subpixeling, to make it more amenable to GPU), but last I profiled it, it was still doing a lot of the pixels on CPU, as others have stated.


I believe that the most HW optimizations are made in MacOS on DWM level - window composition and animation. Window surface is just a bitmap in RAM that needs to be populated by CoreGraphics/CPU.

In any case Acrylic/Vibrancy effects or "blur-behind background" (like on screenshots here: https://sciter.com/sciter-4-2-support-of-acrylic-theming/) are achievable only on GPU and on DWM level.


And before that, I'm pretty sure Core Graphics used OpenGL in some situations. I remember seeing CG::OGL in stack traces for WebKit.


Core Graphics is generally slower than Cairo/Pixman.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: