summaryrefslogtreecommitdiff
path: root/libs/canvas/canvas
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2017-03-19 22:40:58 +0100
committerRobin Gareus <robin@gareus.org>2017-03-19 22:49:17 +0100
commitc371fc511500acada422cdcf93658fc25e5106de (patch)
tree519d15df59ab94c579beceac57aac348c08de329 /libs/canvas/canvas
parent7d41e542fe54feaa24fc87004df2b0276b9941c3 (diff)
Prepare NSView/OpenGL Canvas (to speed up rendering on [mac]OS[X]
This avoids Coregraphics (cairo_quartz_surface..) competely. The openGL texture bypasses CG's slow argb_image and CGSColorMask methods.
Diffstat (limited to 'libs/canvas/canvas')
-rw-r--r--libs/canvas/canvas/canvas.h4
-rw-r--r--libs/canvas/canvas/nsglview.h15
2 files changed, 19 insertions, 0 deletions
diff --git a/libs/canvas/canvas/canvas.h b/libs/canvas/canvas/canvas.h
index 7932705483..20adfa4c45 100644
--- a/libs/canvas/canvas/canvas.h
+++ b/libs/canvas/canvas/canvas.h
@@ -215,6 +215,8 @@ public:
bool on_enter_notify_event (GdkEventCrossing*);
bool on_leave_notify_event (GdkEventCrossing*);
+ void on_realize ();
+
bool button_handler (GdkEventButton *);
bool motion_notify_handler (GdkEventMotion *);
bool deliver_event (GdkEvent *);
@@ -249,6 +251,8 @@ private:
bool really_start_tooltip_timeout ();
bool _in_dtor;
+
+ void* _nsglview;
};
/** A GTK::Alignment with a GtkCanvas inside it plus some Gtk::Adjustments for
diff --git a/libs/canvas/canvas/nsglview.h b/libs/canvas/canvas/nsglview.h
new file mode 100644
index 0000000000..e18a0f68ab
--- /dev/null
+++ b/libs/canvas/canvas/nsglview.h
@@ -0,0 +1,15 @@
+#ifndef __CANVAS_NSGLVIEW_H__
+#define __CANVAS_NSGLVIEW_H__
+
+#include <gdk/gdk.h>
+
+namespace ArdourCanvas
+{
+ class GtkCanvas;
+
+ void* nsglview_create (GtkCanvas*);
+ void nsglview_overlay (void*, GdkWindow*);
+ void nsglview_resize (void*, int x, int y, int w, int h);
+ void nsglview_queue_draw (void*, int x, int y, int w, int h);
+}
+#endif