4 ms·
I thought macOS was already GPU accelerated with Quartz? And wouldn't Windows be doing something similar by now? The CPU is certainly not writing pixels directl
by nsxwolf 8y ago
I thought macOS was already GPU accelerated with Quartz? And wouldn't Windows be doing something similar by now? The CPU is certainly not writing pixels directly out to VESA buffers in 2018, right?
- pcwalton 8y agoMost Cocoa apps use the CPU backend of Core Graphics, which doesn't use the GPU for vector graphics rendering. (CG is usually what "Quartz" refers to, though the brand is so overloaded at this point that it's hard to make any general statements about it.) Cocoa apps do frequently use Core Animation for compositing surfaces together on GPU, though. Most of what terminals have to do is blitting of prerendered text bitmaps, which is relatively slow on CPU and does benefit from the much faster memory bandwidth of the GPU. Core Graphics generally does not use the GPU for text blitting in most Mac apps, so having a custom renderer can help here. Font rasterization on the Mac does not use the GPU either, but the glyph cache hit rate for a terminal emulator is so high that it ends up pretty much irrelevant. On Windows, Microsoft ships multiple rendering stacks for legacy compatibility. Most terminals are old Win32 programs that use classic GDI, which as far as I know is partially accelerated but mostly CPU (and implemented in the kernel!) Direct2D, the newer API, does use the GPU for blitting text. Like macOS, Windows still does all font rasterization on CPU. In GDI, font rasterization is done on CPU in the kernel (!) (except on Windows 10, in which the kernel calls out to a userspace fontdrvhost.exe). In Direct2D, font rasterization is done on CPU in userspace.
- elygre 8y agoAs a software developer, I get upset when people use old versions of my software and talk about how it isn’t modern. This also makes me weary of statements that criticize how e.g. windows does it wrong, “except in the current three years old version”.