Change to "gl" as GSK default renderer

Due to performance reasons
<https://gitlab.gnome.org/GNOME/gtk/-/issues/6411>
This commit is contained in:
Sophie Herold 2024-03-02 20:55:35 +01:00
parent 385bd97b5d
commit 199d258577
2 changed files with 11 additions and 0 deletions

View file

@ -72,6 +72,12 @@ static GRESOURCE_BYTES: &[u8] =
gvdb_macros::include_gresource_from_dir!("/org/gnome/Loupe", "data/resources");
fn main() -> glib::ExitCode {
// Don't use ngl renderer by default due to performance reasons
// <https://gitlab.gnome.org/GNOME/gtk/-/issues/6411>
if std::env::var("GSK_RENDERER").map_or(true, |x| x.is_empty()) {
std::env::set_var("GSK_RENDERER", "gl");
}
let mut log_builder = env_logger::builder();
log_builder.format_timestamp_millis();