Skip to content

Proposal: Custom high-performance rendering item #13495

Description

@rjbaucells

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    need triagingIssue that the owner of the area still need to triage

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions