From cba8fd090f1c61e5fc33daa2f1033eb146cba424 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Fri, 17 Feb 2023 15:41:12 +0100 Subject: [PATCH] Fix widget retina scaling (#9243) For normal cairo-widgets ardour should not use image surfaces on macOS, because that bypasses retina scaling. In theory explicit upsampling could be performed (compere to openGL/cairo), but for the case at hand that is overkill and inconvenient. Performance critical widgets that render periodically can enable openGL backing. Casual widgets (buttons with text, knobs, sliders etc) can be rendered directly without any significant performance penalty. --- libs/gtkmm2ext/cairo_widget.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/gtkmm2ext/cairo_widget.cc b/libs/gtkmm2ext/cairo_widget.cc index bc9b24baf0..90063df514 100644 --- a/libs/gtkmm2ext/cairo_widget.cc +++ b/libs/gtkmm2ext/cairo_widget.cc @@ -63,7 +63,9 @@ CairoWidget::CairoWidget () , _current_parent (0) , _canvas_widget (false) , _nsglview (0) -#ifdef USE_CAIRO_IMAGE_SURFACE +#ifdef __APPLE__ + , _use_image_surface (false) +#elif defined USE_CAIRO_IMAGE_SURFACE , _use_image_surface (true) #else , _use_image_surface (NULL != getenv("ARDOUR_IMAGE_SURFACE"))