13
0

Add API to set openGL backing scale

This commit is contained in:
Robin Gareus 2023-02-04 22:25:52 +01:00
parent cb3f8170ad
commit 509504acf2
6 changed files with 6 additions and 13 deletions

View File

@ -555,12 +555,12 @@ GtkCanvas::GtkCanvas ()
}
void
GtkCanvas::use_nsglview ()
GtkCanvas::use_nsglview (bool retina)
{
assert (!_nsglview);
assert (!get_realized());
#ifdef ARDOUR_CANVAS_NSVIEW_TAG // patched gdkquartz.h
_nsglview = Gtkmm2ext::nsglview_create (this);
_nsglview = Gtkmm2ext::nsglview_create (this, retina);
#endif
}

View File

@ -217,7 +217,7 @@ public:
GtkCanvas ();
~GtkCanvas () { _in_dtor = true ; }
void use_nsglview ();
void use_nsglview (bool retina = true);
void request_redraw (Rect const &);
void request_size (Duple);

View File

@ -96,13 +96,13 @@ CairoWidget::set_canvas_widget ()
}
void
CairoWidget::use_nsglview ()
CairoWidget::use_nsglview (bool retina)
{
assert (!_nsglview);
assert (!_canvas_widget);
assert (!get_realized());
#ifdef ARDOUR_CANVAS_NSVIEW_TAG // patched gdkquartz.h
_nsglview = Gtkmm2ext::nsglview_create (this);
_nsglview = Gtkmm2ext::nsglview_create (this, retina);
#endif
}

View File

@ -41,7 +41,7 @@ public:
virtual ~CairoWidget ();
void set_canvas_widget ();
void use_nsglview ();
void use_nsglview (bool retina = true);
void use_image_surface (bool yn = true);
/* swizzle Gtk::Widget methods for Canvas::Widget */

View File

@ -25,7 +25,6 @@ namespace Gtkmm2ext
{
class CairoCanvas;
void* nsglview_create (CairoCanvas*);
void* nsglview_create (CairoCanvas*, bool use_backing_scale);
void nsglview_overlay (void*, GdkWindow*);
void nsglview_resize (void*, int x, int y, int w, int h);

View File

@ -374,12 +374,6 @@ __attribute__ ((visibility ("hidden")))
}
@end
void*
Gtkmm2ext::nsglview_create (Gtkmm2ext::CairoCanvas* canvas)
{
return nsglview_create (canvas, true);
}
void*
Gtkmm2ext::nsglview_create (Gtkmm2ext::CairoCanvas* canvas, bool use_backing_scale)
{