diff --git a/gdk/gdkglcontext.c b/gdk/gdkglcontext.c index 43d6440510..31c39467e5 100644 --- a/gdk/gdkglcontext.c +++ b/gdk/gdkglcontext.c @@ -1528,7 +1528,8 @@ gdk_gl_context_check_extensions (GdkGLContext *context) if (gdk_gl_context_get_use_es (context)) { - priv->has_unpack_subimage = epoxy_has_gl_extension ("GL_EXT_unpack_subimage"); + priv->has_unpack_subimage = gdk_gl_version_greater_equal (&priv->gl_version, &GDK_GL_VERSION_INIT (3, 0)) || + epoxy_has_gl_extension ("GL_EXT_unpack_subimage"); priv->has_khr_debug = epoxy_has_gl_extension ("GL_KHR_debug"); } else diff --git a/gdk/gdkgltexture.c b/gdk/gdkgltexture.c index d9d62190d9..c0c57f70cb 100644 --- a/gdk/gdkgltexture.c +++ b/gdk/gdkgltexture.c @@ -153,7 +153,7 @@ gdk_gl_texture_find_format (gboolean use_es, if (gdk_memory_format_alpha (format) != alpha) continue; - if (!gdk_memory_format_gl_format (format, use_es, gl_major, gl_minor, &q_internal_format, &q_format, &q_type, &q_swizzle)) + if (!gdk_memory_format_gl_format (format, use_es, gl_major, gl_minor, &q_internal_format, &q_format, &q_type, q_swizzle)) continue; if (q_format != gl_format || q_type != gl_type) @@ -188,7 +188,7 @@ gdk_gl_texture_do_download (GdkGLTexture *self, FALSE, major, minor, &gl_internal_format, - &gl_format, &gl_type, &gl_swizzle)) + &gl_format, &gl_type, gl_swizzle)) { if (download->stride == expected_stride && download->format == format) diff --git a/gdk/gdkmemoryformat.c b/gdk/gdkmemoryformat.c index ec5583a2ad..ff42f23617 100644 --- a/gdk/gdkmemoryformat.c +++ b/gdk/gdkmemoryformat.c @@ -739,12 +739,12 @@ gdk_memory_format_gl_format (GdkMemoryFormat format, guint *out_internal_format, guint *out_format, guint *out_type, - GLint (*out_swizzle)[4]) + GLint out_swizzle[4]) { *out_internal_format = memory_formats[format].gl.internal_format; *out_format = memory_formats[format].gl.format; *out_type = memory_formats[format].gl.type; - memcpy (out_swizzle, &memory_formats[format].gl.swizzle, sizeof(GLint) * 4); + memcpy (out_swizzle, memory_formats[format].gl.swizzle, sizeof(GLint) * 4); if (gles) { diff --git a/gdk/gdkmemoryformatprivate.h b/gdk/gdkmemoryformatprivate.h index 9f56442de5..65041791f0 100644 --- a/gdk/gdkmemoryformatprivate.h +++ b/gdk/gdkmemoryformatprivate.h @@ -52,7 +52,7 @@ gboolean gdk_memory_format_gl_format (GdkMemoryFormat guint *out_internal_format, guint *out_format, guint *out_type, - GLint (*out_gizzle)[4]); + GLint out_gizzle[4]); void gdk_memory_convert (guchar *dest_data, gsize dest_stride, diff --git a/gsk/gl/gskglcommandqueue.c b/gsk/gl/gskglcommandqueue.c index 4dd222b5d0..0924b73993 100644 --- a/gsk/gl/gskglcommandqueue.c +++ b/gsk/gl/gskglcommandqueue.c @@ -1456,7 +1456,7 @@ memory_format_gl_format (GdkMemoryFormat data_format, guint *gl_internalformat, guint *gl_format, guint *gl_type, - GLint (*gl_swizzle)[4]) + GLint gl_swizzle[4]) { GdkMemoryDepth depth; @@ -1577,7 +1577,7 @@ gsk_gl_command_queue_do_upload_texture_chunk (GskGLCommandQueue *self, &gl_internalformat, &gl_format, &gl_type, - &gl_swizzle); + gl_swizzle); gdk_texture_downloader_init (&downloader, texture); gdk_texture_downloader_set_format (&downloader, data_format); @@ -1595,8 +1595,7 @@ gsk_gl_command_queue_do_upload_texture_chunk (GskGLCommandQueue *self, { glTexSubImage2D (GL_TEXTURE_2D, 0, x, y, width, height, gl_format, gl_type, data); } - else if (stride % bpp == 0 && - (gdk_gl_context_check_version (self->context, NULL, "3.0") || gdk_gl_context_has_unpack_subimage (self->context))) + else if (stride % bpp == 0 && gdk_gl_context_has_unpack_subimage (self->context)) { glPixelStorei (GL_UNPACK_ROW_LENGTH, stride / bpp); @@ -1684,7 +1683,7 @@ gsk_gl_command_queue_upload_texture_chunks (GskGLCommandQueue *self, &gl_internalformat, &gl_format, &gl_type, - &gl_swizzle); + gl_swizzle); glTexImage2D (GL_TEXTURE_2D, 0, gl_internalformat, width, height, 0, gl_format, gl_type, NULL); diff --git a/gsk/gskrendernode.h b/gsk/gskrendernode.h index 7024b47121..dd1e70904d 100644 --- a/gsk/gskrendernode.h +++ b/gsk/gskrendernode.h @@ -35,7 +35,6 @@ G_BEGIN_DECLS #define GSK_SERIALIZATION_ERROR (gsk_serialization_error_quark ()) -typedef struct _GskRenderNode GskRenderNode; typedef struct _GskColorStop GskColorStop; typedef struct _GskShadow GskShadow; diff --git a/gsk/gsktypes.h b/gsk/gsktypes.h index 2fba08a7cf..234f8fe1b0 100644 --- a/gsk/gsktypes.h +++ b/gsk/gsktypes.h @@ -29,6 +29,7 @@ typedef struct _GskPath GskPath; typedef struct _GskPathBuilder GskPathBuilder; typedef struct _GskPathPoint GskPathPoint; typedef struct _GskRenderer GskRenderer; +typedef struct _GskRenderNode GskRenderNode; typedef struct _GskStroke GskStroke; typedef struct _GskTransform GskTransform; diff --git a/gtk/deprecated/gtktreeviewcolumn.c b/gtk/deprecated/gtktreeviewcolumn.c index 090cf33eb7..f22631c7a8 100644 --- a/gtk/deprecated/gtktreeviewcolumn.c +++ b/gtk/deprecated/gtktreeviewcolumn.c @@ -937,13 +937,13 @@ gtk_tree_view_column_update_button (GtkTreeViewColumn *tree_column) if ((!alternative && priv->sort_order == GTK_SORT_ASCENDING) || (alternative && priv->sort_order == GTK_SORT_DESCENDING)) { - gtk_widget_remove_css_class (arrow, "descending"); - gtk_widget_add_css_class (arrow, "ascending"); + gtk_widget_remove_css_class (arrow, "ascending"); + gtk_widget_add_css_class (arrow, "descending"); } else { - gtk_widget_remove_css_class (arrow, "ascending"); - gtk_widget_add_css_class (arrow, "descending"); + gtk_widget_remove_css_class (arrow, "descending"); + gtk_widget_add_css_class (arrow, "ascending"); } } diff --git a/gtk/gtkcolumnview.c b/gtk/gtkcolumnview.c index c3db9d0e7f..f95738bfce 100644 --- a/gtk/gtkcolumnview.c +++ b/gtk/gtkcolumnview.c @@ -1798,6 +1798,8 @@ gtk_column_view_scroll_to_column (GtkColumnView *self, gtk_adjustment_get_page_size (self->hadjustment)); gtk_adjustment_set_value (self->hadjustment, new_value); + + g_clear_pointer (&scroll_info, gtk_scroll_info_unref); } void @@ -2214,9 +2216,14 @@ gtk_column_view_scroll_to (GtkColumnView *self, if (column && (flags & GTK_LIST_SCROLL_FOCUS)) gtk_column_view_set_focus_column (self, column, FALSE); - gtk_list_view_scroll_to (self->listview, pos, flags, scroll); + gtk_list_view_scroll_to (self->listview, + pos, + flags, + scroll ? gtk_scroll_info_ref (scroll) : NULL); if (column) gtk_column_view_scroll_to_column (self, column, scroll); + else + g_clear_pointer (&scroll, gtk_scroll_info_unref); } diff --git a/gtk/gtkviewport.c b/gtk/gtkviewport.c index 73ed29f877..91051ed055 100644 --- a/gtk/gtkviewport.c +++ b/gtk/gtkviewport.c @@ -744,5 +744,7 @@ gtk_viewport_scroll_to (GtkViewport *viewport, gtk_adjustment_animate_to_value (viewport->adjustment[GTK_ORIENTATION_HORIZONTAL], x); gtk_adjustment_animate_to_value (viewport->adjustment[GTK_ORIENTATION_VERTICAL], y); + + g_clear_pointer (&scroll, gtk_scroll_info_unref); }