GPU fill path tessellation
Overview
The GPU Path tessellator for fills is Prysm’s preferred way of rendering path fills. It offers a significant CPU performance boost, and it offloads a large portion of the path fills rendering to the GPU. However, there are small visual differences in the rendered paths between the CPU and the GPU algorithms.
How to use
The GPU tessellator is enabled by default and works out of the box on all platforms except on iOS. The algorithm is only applied to shapes that fit within a 1024x1024 texture. Larger shapes will be handled by the previous CPU-based solution.
For the tessellator to be used by the rendering library, the renoir::RendererCaps::SupportsMSAATextures rendering backend capability has to be supported. If its value is set to false, Prysm will fall back to using the old CPU tessellator.
The GPU tessellator can be disabled globally with the cohtml::LibraryParams::PreferGPUTessellator library setting when initializing the cohtml::Library. If the setting is set to false, Prysm will use the CPU tessellator for all path fills.
Details
Performance
In our stress tests, we measured a 6-11x boost in performance, a 100-400 Mb reduction in CPU memory consumption, and an increase of 15-30 Mb in GPU memory usage.
Visual Quality
The GPU tessellator renders the paths with slightly worse anti-aliasing than the CPU tessellator. This is due to the nature of the tessellation algorithm.
