Closed jazzfool closed 4 years ago
I'm going to close this, I took a stab at it, but maybe someone else with more experience can work on it. Reaching feature parity with Skia (backdrop filters, filters, text rendering, selective anti-aliasing, high quality GPU anti-aliasing) is way beyond my GPU programming knowledge.
A graphics display implementation based on WGPU and Lyon. This should outperform the Skia back-end simply due to the smaller scope and the luxury of retained-mode input.
Some general ideas to be implemented:
1 command group = 1 VBO + 1 IBO + possibly 1 bind group.Implemented, but a bad idea in terms of GPU memory allocation: we can easily collate this into a single buffer.modify_command_group
should look to see if the command group has been transformed rather than graphically mutated so that we can simply modify by changing the transform matrix instead of re-tessellating.Provide two implementations: one for the main draw target and one for texture draw target. This should allow for retaining layers for performance, i.e. a scrollable area where scrolling = drawing texture at a different position vs redrawing everything inside.Would impede on renderer-agnosticity.Implement per-vertex AA by generating our own vertex normals and then using simple feathering in the shader.Not sure how feasible this is, seems more in the scope of Lyon.Progress:
GraphicsDisplayItem
.TextDisplayItem
(viawgpu_glyph
).DisplayClip
).BackdropFilter
. Depends on clipping.SaveLayer
.Enhancements:
modify_command_group
.BackdropFilter
rather than ping-ponging.