4 ms·
> Now the boxes get filled with pixels, colors, borders, shadows and images. Think of someone coloring in the board game pieces. This also uses the CPU and some
by diath 1y ago
> Now the boxes get filled with pixels, colors, borders, shadows and images. Think of someone coloring in the board game pieces. This also uses the CPU and some extra memory to store the painted bits.
Are you sure this is happening on the CPU? I thought the CPU-side only generates a list of paint commands but the GPU does the bulk of this job.
- mtklein 1y agoFor a good long while at least, this flag was a signal for the browser to use CPU rendering, because of the overhead of GPU setup for rendering very changing content was too high. My knowledge is dated and second hand though. New GPU APIs hopefully changed this!
- bgirard 1y agoDo you have a citation? I don't believe that was ever the case when I worked on this.
- gmueckl 1y agoIs this true for text? Glyph rendering is complicated and I have a hard time imagining a high quality GPU renderer that can beat a CPU renderer due to this.
- qingcharles 1y agoI believe the situation has changed in the last year or so? I remember reading a bunch of stuff about how text rendering is finally being able to be pushed onto the GPU lately.
- krapp 1y agoThe SDL3 TTF library has the TextEngine API to build a font atlas targeting the CPU or GPU (eg https://wiki.libsdl.org/SDL3_ttf/TTF_CreateGPUTextEngine https://wiki.libsdl.org/SDL3_ttf/TTF_CreateGPUTextEngine). Its slightly more cumbersome because you have to work with TTF_Text objects instead of char*s but it's quite doable.