From 714a91e928bdfd51a847754db24d9341591f527c Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Fri, 31 Mar 2023 08:13:45 +0200 Subject: [PATCH] cmake: Add the `SLINT_FEATURE_RENDERER_WINIT_SOFTWARE` option to enable the software renderer --- CHANGELOG.md | 1 + api/cpp/CMakeLists.txt | 1 + api/cpp/Cargo.toml | 1 + 3 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2abc5393c..2601198f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -50,6 +50,7 @@ All notable changes to this project are documented in this file. - **Breaking:** The order of C++ generated struct members is now preserved from the .slint source file. - Add constructors to `slint::Image` to create images from raw pixel data. - In C++ builds, support all image formats the Rust image-rs crate supports, not just png and jpeg. + - Added the `SLINT_FEATURE_RENDERER_WINIT_SOFTWARE` option to enable the software renderer. ### Tooling diff --git a/api/cpp/CMakeLists.txt b/api/cpp/CMakeLists.txt index 46cc58067..8ea32cc21 100644 --- a/api/cpp/CMakeLists.txt +++ b/api/cpp/CMakeLists.txt @@ -87,6 +87,7 @@ define_cargo_feature(backend-winit-wayland "Enable support for the winit create define_cargo_feature(renderer-winit-femtovg "Enable support for the OpenGL ES 2.0 based FemtoVG rendering engine." ON) define_cargo_feature(renderer-winit-skia "Enable support for the Skia based rendering engine." OFF) define_cargo_feature(renderer-winit-skia-opengl "Enable support for the Skia based rendering engine with its OpenGL backend." OFF) +define_cargo_feature(renderer-winit-software "Enable support for the software renderer with the winit backend" OFF) define_cargo_feature(backend-qt "Enable Qt based rendering backend" ON) diff --git a/api/cpp/Cargo.toml b/api/cpp/Cargo.toml index 06facff6c..c6545dd79 100644 --- a/api/cpp/Cargo.toml +++ b/api/cpp/Cargo.toml @@ -33,6 +33,7 @@ backend-winit-wayland = ["i-slint-backend-selector/backend-winit-wayland"] renderer-winit-femtovg = ["i-slint-backend-selector/renderer-winit-femtovg"] renderer-winit-skia = ["i-slint-backend-selector/renderer-winit-skia"] renderer-winit-skia-opengl = ["i-slint-backend-selector/renderer-winit-skia-opengl"] +renderer-winit-software = ["i-slint-backend-selector/renderer-winit-software"] experimental = ["i-slint-renderer-skia", "raw-window-handle"]