Feature Description
Support custom Slint items that can perform high-performance rendering directly through the active Slint renderer.
The custom item should participate in Slint's normal rendering pipeline, including transforms, clipping, scaling and dirty-region handling, while allowing application code to perform the actual drawing using the active renderer's rendering context.
The API should remain renderer-agnostic. I am not proposing a new universal 2D drawing API; the actual drawing should use the capabilities of the active renderer (for example, a Skia canvas when using the Skia renderer).
I would like to discuss the appropriate API and architecture before implementing an upstream PR.
Product Impact
I am building a cross-platform C++ schematic editor with Slint.
The application needs a highly interactive canvas containing potentially thousands of graphical elements such as wires, symbols, pins, labels, grid elements and selection highlights. These elements need to be redrawn continuously while the user pans, zooms, selects and edits the schematic.
Using individual Slint items or paths for all of these elements would introduce unnecessary UI-item overhead. Rendering the canvas to an Image would also introduce an unnecessary intermediate rendering/copying step.
A custom rendering item would allow Slint to continue handling the UI, layout, input and item hierarchy while the application handles high-performance canvas rendering through the same renderer used by Slint.
This is important for the product rather than a nice-to-have feature. Without this capability, the application needs to maintain a separate rendering mechanism or use approaches that are not appropriate for a large, highly interactive schematic canvas.
Feature Description
Support custom Slint items that can perform high-performance rendering directly through the active Slint renderer.
The custom item should participate in Slint's normal rendering pipeline, including transforms, clipping, scaling and dirty-region handling, while allowing application code to perform the actual drawing using the active renderer's rendering context.
The API should remain renderer-agnostic. I am not proposing a new universal 2D drawing API; the actual drawing should use the capabilities of the active renderer (for example, a Skia canvas when using the Skia renderer).
I would like to discuss the appropriate API and architecture before implementing an upstream PR.
Product Impact
I am building a cross-platform C++ schematic editor with Slint.
The application needs a highly interactive canvas containing potentially thousands of graphical elements such as wires, symbols, pins, labels, grid elements and selection highlights. These elements need to be redrawn continuously while the user pans, zooms, selects and edits the schematic.
Using individual Slint items or paths for all of these elements would introduce unnecessary UI-item overhead. Rendering the canvas to an Image would also introduce an unnecessary intermediate rendering/copying step.
A custom rendering item would allow Slint to continue handling the UI, layout, input and item hierarchy while the application handles high-performance canvas rendering through the same renderer used by Slint.
This is important for the product rather than a nice-to-have feature. Without this capability, the application needs to maintain a separate rendering mechanism or use approaches that are not appropriate for a large, highly interactive schematic canvas.