aboutsummaryrefslogtreecommitdiffstats
path: root/src/callbacks.h
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-09-05 11:31:35 (GMT)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-09-05 12:23:32 (GMT)
commit98a4baa241cfd710e27d51871f17bee3f60930cc (patch)
tree39d58498546ae0e04e4fd3a60f525bd023c964a8 /src/callbacks.h
parentb7c0e34d931af0bf04437e22b2490bee671e123f (diff)
callbacks: Optimize cairo logic for Gtk 3
With Gtk 3, we don't need to implement the funtion gdk_cairo_surface_create_from_pixbuf() ourselves, as it is available there. So, just call the right function. Also, with Gtk 3.22 and above, the old way of calling gdk_cairo_create() is obsolete, as all windows already have it. So, instead, just instance it. That supresses a deprecated function warning: callbacks.c:604:5: warning: ‘gdk_cairo_create’ is deprecated: Use 'gdk_window_begin_draw_frame() and gdk_drawing_context_get_cairo_context()' instead [-Wdeprecated-declarations] cr = gdk_cairo_create(window); ^~ In file included from /usr/include/gtk-3.0/gdk/gdk.h:33, from /usr/include/gtk-3.0/gtk/gtk.h:30, from v4l.h:24, from callbacks.h:4, from callbacks.c:1: /usr/include/gtk-3.0/gdk/gdkcairo.h:35:12: note: declared here cairo_t * gdk_cairo_create (GdkWindow *window); ^~~~~~~~~~~~~~~~ While here, add a missing surface destroy in order to avoid possible memory leaks. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'src/callbacks.h')
0 files changed, 0 insertions, 0 deletions

Privacy Policy