aboutsummaryrefslogtreecommitdiffstats
path: root/data
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-09-05 08:31:35 -0300
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-09-05 09:23:32 -0300
commit98a4baa241cfd710e27d51871f17bee3f60930cc (patch)
tree39d58498546ae0e04e4fd3a60f525bd023c964a8 /data
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 'data')
0 files changed, 0 insertions, 0 deletions

Privacy Policy