Compare commits
24 Commits
matthiasc/
...
wip-vulkan
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f502743621 | ||
|
|
de5b6764bc | ||
|
|
bc17dfa83d | ||
|
|
84a98f74c1 | ||
|
|
50facedc47 | ||
|
|
200cacc3ad | ||
|
|
eed3cab29f | ||
|
|
76b0687467 | ||
|
|
5039dc40f8 | ||
|
|
7c3de4a2da | ||
|
|
b486e9b760 | ||
|
|
ce2fd8a0d0 | ||
|
|
99b1b26fdb | ||
|
|
b7e4bbaf74 | ||
|
|
f579b171a9 | ||
|
|
f9929d15eb | ||
|
|
c45a6ad52d | ||
|
|
7233e38aa8 | ||
|
|
73ba97acd9 | ||
|
|
7d2ad604d2 | ||
|
|
45e64b915c | ||
|
|
ebaef9f18b | ||
|
|
c73fe8ac4a | ||
|
|
8ed8f883d1 |
48
NEWS
48
NEWS
@@ -1,6 +1,54 @@
|
||||
Overview of Changes in 4.15.1, xx-xx-xxxx
|
||||
=========================================
|
||||
|
||||
* GtkGraphicsOffload:
|
||||
- Don't crash without a child
|
||||
|
||||
* CSS:
|
||||
- Support the :root selector
|
||||
|
||||
* Icontheme:
|
||||
- Make symbolic svg loading more efficient
|
||||
- Handle color-free symbolics more efficiently
|
||||
|
||||
* Accessibility:
|
||||
- Make the gtk-demo sidebar search more accessible
|
||||
- Stop emitting focus events
|
||||
|
||||
* GDK:
|
||||
- Support XDG_ACTIVATION_TOKEN
|
||||
- dmabuf: Be more defensive when importing unknown formats to GL
|
||||
- dmabuf: Use narrow range for YUV
|
||||
|
||||
* GSK:
|
||||
- Improve logging for GDK_DEBUG=offload
|
||||
- Improve logging for GSK_DEBUG=renderer
|
||||
- gpu: Warn about inefficient texture import
|
||||
- gpu: Handle tiny offscreens correctly
|
||||
- vulkan: Add profiler marks in various places
|
||||
- vulkan: Fix a problem with imported dmabufs showing up black
|
||||
|
||||
* Wayland:
|
||||
- Use wl_compositor version 6
|
||||
|
||||
* X11:
|
||||
- Implement a missing method
|
||||
|
||||
* Build:
|
||||
- Fix many ubsan warnings
|
||||
|
||||
* Debugging:
|
||||
- Show more texture details in the recorder
|
||||
|
||||
* macOS:
|
||||
- Fix problems with events handed back to the OS
|
||||
- Respect GDK_DEBUG=default-settings
|
||||
|
||||
* Translation updates:
|
||||
Korean
|
||||
Turkish
|
||||
|
||||
|
||||
Overview of Changes in 4.15.0, 21-04-2024
|
||||
=========================================
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ get_win32_all_locales_scripts (LPWSTR locale_w, DWORD flags, LPARAM param)
|
||||
{
|
||||
wchar_t *langname_w = NULL;
|
||||
wchar_t locale_abbrev_w[9];
|
||||
gchar *langname, *locale_abbrev, *locale, *p;
|
||||
gchar *langname, *locale_abbrev, *locale;
|
||||
gint i;
|
||||
const LCTYPE iso639_lctypes[] = { LOCALE_SISO639LANGNAME, LOCALE_SISO639LANGNAME2 };
|
||||
GHashTable *ht_scripts_langs = (GHashTable *) param;
|
||||
@@ -59,7 +59,6 @@ get_win32_all_locales_scripts (LPWSTR locale_w, DWORD flags, LPARAM param)
|
||||
GetLocaleInfoEx (locale_w, LOCALE_SLOCALIZEDDISPLAYNAME, langname_w, langname_size);
|
||||
langname = g_utf16_to_utf8 (langname_w, -1, NULL, NULL, NULL);
|
||||
locale = g_utf16_to_utf8 (locale_w, -1, NULL, NULL, NULL);
|
||||
p = strchr (locale, '-');
|
||||
lang = pango_language_from_string (locale);
|
||||
if (g_hash_table_lookup (ht_scripts_langs, lang) == NULL)
|
||||
g_hash_table_insert (ht_scripts_langs, lang, langname);
|
||||
|
||||
@@ -163,6 +163,8 @@ gdk_dmabuf_get_egl_downloader (GdkDisplay *display,
|
||||
return NULL;
|
||||
|
||||
previous = gdk_gl_context_get_current ();
|
||||
if (previous)
|
||||
g_object_ref (previous);
|
||||
formats = gdk_dmabuf_formats_builder_new ();
|
||||
external = gdk_dmabuf_formats_builder_new ();
|
||||
|
||||
@@ -194,7 +196,10 @@ gdk_dmabuf_get_egl_downloader (GdkDisplay *display,
|
||||
}
|
||||
|
||||
if (previous)
|
||||
gdk_gl_context_make_current (previous);
|
||||
{
|
||||
gdk_gl_context_make_current (previous);
|
||||
g_object_unref (previous);
|
||||
}
|
||||
|
||||
return GDK_DMABUF_DOWNLOADER (renderer);
|
||||
}
|
||||
|
||||
@@ -1956,8 +1956,6 @@ gdk_gl_context_get_glsl_version_string (GdkGLContext *self)
|
||||
return "#version 310 es";
|
||||
else if (gdk_gl_version_greater_equal (&priv->gl_version, &GDK_GL_VERSION_INIT (3, 0)))
|
||||
return "#version 300 es";
|
||||
else if (gdk_gl_version_greater_equal (&priv->gl_version, &GDK_GL_VERSION_INIT (3, 0)))
|
||||
return "#version 300 es";
|
||||
else
|
||||
return "#version 100";
|
||||
}
|
||||
|
||||
@@ -632,6 +632,7 @@ gdk_vulkan_context_begin_frame (GdkDrawContext *draw_context,
|
||||
{
|
||||
GdkVulkanContext *context = GDK_VULKAN_CONTEXT (draw_context);
|
||||
GdkVulkanContextPrivate *priv = gdk_vulkan_context_get_instance_private (context);
|
||||
VkResult acquire_result;
|
||||
guint i;
|
||||
|
||||
if (depth != priv->current_format)
|
||||
@@ -653,12 +654,29 @@ gdk_vulkan_context_begin_frame (GdkDrawContext *draw_context,
|
||||
cairo_region_union (priv->regions[i], region);
|
||||
}
|
||||
|
||||
GDK_VK_CHECK (vkAcquireNextImageKHR, gdk_vulkan_context_get_device (context),
|
||||
priv->swapchain,
|
||||
UINT64_MAX,
|
||||
priv->draw_semaphore,
|
||||
VK_NULL_HANDLE,
|
||||
&priv->draw_index);
|
||||
acquire_next_image:
|
||||
acquire_result = GDK_VK_CHECK (vkAcquireNextImageKHR, gdk_vulkan_context_get_device (context),
|
||||
priv->swapchain,
|
||||
UINT64_MAX,
|
||||
priv->draw_semaphore,
|
||||
VK_NULL_HANDLE,
|
||||
&priv->draw_index);
|
||||
if ((acquire_result == VK_ERROR_OUT_OF_DATE_KHR) ||
|
||||
(acquire_result == VK_SUBOPTIMAL_KHR))
|
||||
{
|
||||
GError *error = NULL;
|
||||
|
||||
GDK_DEBUG (VULKAN, "Recreating the swapchain");
|
||||
|
||||
if (!gdk_vulkan_context_check_swapchain (context, &error))
|
||||
{
|
||||
g_warning ("%s", error->message);
|
||||
g_error_free (error);
|
||||
return;
|
||||
}
|
||||
|
||||
goto acquire_next_image;
|
||||
}
|
||||
|
||||
cairo_region_union (region, priv->regions[priv->draw_index]);
|
||||
}
|
||||
|
||||
@@ -908,7 +908,9 @@ _gdk_win32_create_hicon_for_texture (GdkTexture *texture,
|
||||
width = cairo_image_surface_get_width (surface);
|
||||
height = cairo_image_surface_get_height (surface);
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
pixbuf = gdk_pixbuf_get_from_surface (surface, 0, 0, width, height);
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
icon = pixbuf_to_hicon (pixbuf, is_icon, x, y);
|
||||
|
||||
|
||||
@@ -267,7 +267,7 @@ create_dummy_gl_window (void)
|
||||
{
|
||||
WNDCLASS wclass = { 0, };
|
||||
ATOM klass;
|
||||
HWND hwnd;
|
||||
HWND hwnd = NULL;
|
||||
|
||||
wclass.lpszClassName = "GdkGLDummyWindow";
|
||||
wclass.lpfnWndProc = DefWindowProc;
|
||||
|
||||
@@ -38,7 +38,6 @@ gdk_win32_vulkan_context_create_surface (GdkVulkanContext *context,
|
||||
{
|
||||
GdkSurface *window = gdk_draw_context_get_surface (GDK_DRAW_CONTEXT (context));
|
||||
GdkDisplay *display = gdk_draw_context_get_display (GDK_DRAW_CONTEXT (context));
|
||||
GdkWin32Surface *win32_surface = GDK_WIN32_SURFACE (window);
|
||||
VkWin32SurfaceCreateInfoKHR info;
|
||||
VkResult result;
|
||||
|
||||
|
||||
@@ -546,7 +546,7 @@ gsk_gpu_device_maybe_gc (GskGpuDevice *self)
|
||||
|
||||
if (priv->cache_timeout == 0 || dead_texture_pixels > 1000000)
|
||||
{
|
||||
GSK_DEBUG (GLYPH_CACHE, "Pre-frame GC (%lu dead pixels)", dead_texture_pixels);
|
||||
GSK_DEBUG (GLYPH_CACHE, "Pre-frame GC (%" G_GSIZE_FORMAT " dead pixels)", dead_texture_pixels);
|
||||
gsk_gpu_device_gc (self, g_get_monotonic_time ());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -311,7 +311,7 @@ gsk_gpu_node_processor_add_images (GskGpuNodeProcessor *self,
|
||||
while (desc != self->desc);
|
||||
}
|
||||
|
||||
static void
|
||||
static gboolean G_GNUC_WARN_UNUSED_RESULT
|
||||
rect_round_to_pixels (const graphene_rect_t *src,
|
||||
const graphene_vec2_t *pixel_scale,
|
||||
const graphene_point_t *pixel_offset,
|
||||
@@ -331,6 +331,8 @@ rect_round_to_pixels (const graphene_rect_t *src,
|
||||
y * inv_yscale - pixel_offset->y,
|
||||
(ceilf ((src->origin.x + pixel_offset->x + src->size.width) * xscale) - x) * inv_xscale,
|
||||
(ceilf ((src->origin.y + pixel_offset->y + src->size.height) * yscale) - y) * inv_yscale);
|
||||
|
||||
return ceilf (xscale * dest->size.width) > 0 && ceilf (yscale * dest->size.height) > 0;
|
||||
}
|
||||
|
||||
static GskGpuImage *
|
||||
@@ -963,7 +965,9 @@ gsk_gpu_node_processor_get_node_as_image (GskGpuNodeProcessor *self,
|
||||
if (!gsk_rect_intersection (clip_bounds, &node->bounds, &clip))
|
||||
return NULL;
|
||||
}
|
||||
rect_round_to_pixels (&clip, &self->scale, &self->offset, &clip);
|
||||
|
||||
if (!rect_round_to_pixels (&clip, &self->scale, &self->offset, &clip))
|
||||
return NULL;
|
||||
|
||||
image = gsk_gpu_get_node_as_image (self->frame,
|
||||
&clip,
|
||||
@@ -1020,7 +1024,8 @@ gsk_gpu_node_processor_blur_op (GskGpuNodeProcessor *self,
|
||||
if (!gsk_rect_intersection (rect, &clip_rect, &intermediate_rect))
|
||||
return;
|
||||
|
||||
rect_round_to_pixels (&intermediate_rect, &self->scale, &self->offset, &intermediate_rect);
|
||||
if (!rect_round_to_pixels (&intermediate_rect, &self->scale, &self->offset, &intermediate_rect))
|
||||
return;
|
||||
|
||||
intermediate = gsk_gpu_node_processor_init_draw (&other,
|
||||
self->frame,
|
||||
@@ -1083,7 +1088,8 @@ gsk_gpu_node_processor_add_fallback_node (GskGpuNodeProcessor *self,
|
||||
if (!gsk_gpu_node_processor_clip_node_bounds (self, node, &clipped_bounds))
|
||||
return;
|
||||
|
||||
rect_round_to_pixels (&clipped_bounds, &self->scale, &self->offset, &clipped_bounds);
|
||||
if (!rect_round_to_pixels (&clipped_bounds, &self->scale, &self->offset, &clipped_bounds))
|
||||
return;
|
||||
|
||||
gsk_gpu_node_processor_sync_globals (self, 0);
|
||||
|
||||
@@ -1439,7 +1445,9 @@ gsk_gpu_node_processor_add_rounded_clip_node_with_mask (GskGpuNodeProcessor *sel
|
||||
|
||||
if (!gsk_gpu_node_processor_clip_node_bounds (self, node, &clip_bounds))
|
||||
return;
|
||||
rect_round_to_pixels (&clip_bounds, &self->scale, &self->offset, &clip_bounds);
|
||||
|
||||
if (!rect_round_to_pixels (&clip_bounds, &self->scale, &self->offset, &clip_bounds))
|
||||
return;
|
||||
|
||||
child_image = gsk_gpu_node_processor_get_node_as_image (self,
|
||||
0,
|
||||
@@ -2068,7 +2076,9 @@ gsk_gpu_node_processor_add_texture_scale_node (GskGpuNodeProcessor *self,
|
||||
|
||||
gsk_gpu_node_processor_get_clip_bounds (self, &clip_bounds);
|
||||
/* first round to pixel boundaries, so we make sure the full pixels are covered */
|
||||
rect_round_to_pixels (&clip_bounds, &self->scale, &self->offset, &clip_bounds);
|
||||
if (!rect_round_to_pixels (&clip_bounds, &self->scale, &self->offset, &clip_bounds))
|
||||
return;
|
||||
|
||||
/* then expand by half a pixel so that pixels needed for eventual linear
|
||||
* filtering are available */
|
||||
graphene_rect_inset (&clip_bounds, -0.5, -0.5);
|
||||
@@ -2276,7 +2286,9 @@ gsk_gpu_node_processor_add_gradient_node (GskGpuNodeProcessor *self,
|
||||
|
||||
if (!gsk_gpu_node_processor_clip_node_bounds (self, node, &bounds))
|
||||
return;
|
||||
rect_round_to_pixels (&bounds, &self->scale, &self->offset, &bounds);
|
||||
|
||||
if (!rect_round_to_pixels (&bounds, &self->scale, &self->offset, &bounds))
|
||||
return;
|
||||
|
||||
image = gsk_gpu_node_processor_init_draw (&other,
|
||||
self->frame,
|
||||
@@ -3581,7 +3593,9 @@ gsk_gpu_node_processor_add_fill_node (GskGpuNodeProcessor *self,
|
||||
|
||||
if (!gsk_gpu_node_processor_clip_node_bounds (self, node, &clip_bounds))
|
||||
return;
|
||||
rect_round_to_pixels (&clip_bounds, &self->scale, &self->offset, &clip_bounds);
|
||||
|
||||
if (!rect_round_to_pixels (&clip_bounds, &self->scale, &self->offset, &clip_bounds))
|
||||
return;
|
||||
|
||||
child = gsk_fill_node_get_child (node);
|
||||
|
||||
@@ -3678,7 +3692,9 @@ gsk_gpu_node_processor_add_stroke_node (GskGpuNodeProcessor *self,
|
||||
|
||||
if (!gsk_gpu_node_processor_clip_node_bounds (self, node, &clip_bounds))
|
||||
return;
|
||||
rect_round_to_pixels (&clip_bounds, &self->scale, &self->offset, &clip_bounds);
|
||||
|
||||
if (!rect_round_to_pixels (&clip_bounds, &self->scale, &self->offset, &clip_bounds))
|
||||
return;
|
||||
|
||||
child = gsk_stroke_node_get_child (node);
|
||||
|
||||
@@ -4111,15 +4127,17 @@ gsk_gpu_node_processor_create_node_pattern (GskGpuPatternWriter *self,
|
||||
gsk_gpu_descriptors_set_size (self->desc, images_before, buffers_before);
|
||||
}
|
||||
|
||||
rect_round_to_pixels (&GRAPHENE_RECT_INIT (
|
||||
self->bounds.origin.x - self->offset.x,
|
||||
self->bounds.origin.y - self->offset.y,
|
||||
self->bounds.size.width,
|
||||
self->bounds.size.height
|
||||
),
|
||||
&self->scale,
|
||||
&self->offset,
|
||||
&bounds);
|
||||
if (!rect_round_to_pixels (&GRAPHENE_RECT_INIT (
|
||||
self->bounds.origin.x - self->offset.x,
|
||||
self->bounds.origin.y - self->offset.y,
|
||||
self->bounds.size.width,
|
||||
self->bounds.size.height
|
||||
),
|
||||
&self->scale,
|
||||
&self->offset,
|
||||
&bounds))
|
||||
return TRUE;
|
||||
|
||||
image = gsk_gpu_get_node_as_image (self->frame,
|
||||
&bounds,
|
||||
&self->scale,
|
||||
|
||||
@@ -1139,7 +1139,7 @@ gsk_vulkan_device_get_vk_pipeline (GskVulkanDevice *self,
|
||||
format);
|
||||
|
||||
GSK_DEBUG (SHADERS,
|
||||
"Create Vulkan pipeline (%s %s, %u/%s/%s/%u) for layout (%lu/%lu/%lu)",
|
||||
"Create Vulkan pipeline (%s %s, %u/%s/%s/%u) for layout (%" G_GSIZE_FORMAT "/%" G_GSIZE_FORMAT "/%" G_GSIZE_FORMAT ")",
|
||||
op_class->shader_name,
|
||||
version_string + 1,
|
||||
variation,
|
||||
|
||||
@@ -3560,13 +3560,13 @@ append_texture_param (Printer *p,
|
||||
case GDK_MEMORY_U8:
|
||||
case GDK_MEMORY_U16:
|
||||
bytes = gdk_texture_save_to_png_bytes (texture);
|
||||
g_string_append (p->str, "url(\"data:image/png;base64,");
|
||||
g_string_append (p->str, "url(\"data:image/png;base64,\\\n");
|
||||
break;
|
||||
|
||||
case GDK_MEMORY_FLOAT16:
|
||||
case GDK_MEMORY_FLOAT32:
|
||||
bytes = gdk_texture_save_to_tiff_bytes (texture);
|
||||
g_string_append (p->str, "url(\"data:image/tiff;base64,");
|
||||
g_string_append (p->str, "url(\"data:image/tiff;base64,\\\n");
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -3625,7 +3625,7 @@ gsk_text_node_serialize_font (GskRenderNode *node,
|
||||
|
||||
b64 = base64_encode_with_linebreaks ((const guchar *) data, len);
|
||||
|
||||
g_string_append (p->str, " url(\"data:font/ttf;base64,");
|
||||
g_string_append (p->str, " url(\"data:font/ttf;base64,\\\n");
|
||||
append_escaping_newlines (p->str, b64);
|
||||
g_string_append (p->str, "\")");
|
||||
|
||||
@@ -4443,7 +4443,7 @@ render_node_print (Printer *p,
|
||||
cairo_surface_write_to_png_stream (surface, cairo_write_array, array);
|
||||
|
||||
_indent (p);
|
||||
g_string_append (p->str, "pixels: url(\"data:image/png;base64,");
|
||||
g_string_append (p->str, "pixels: url(\"data:image/png;base64,\\\n");
|
||||
b64 = base64_encode_with_linebreaks (array->data, array->len);
|
||||
append_escaping_newlines (p->str, b64);
|
||||
g_free (b64);
|
||||
@@ -4463,7 +4463,7 @@ render_node_print (Printer *p,
|
||||
if (cairo_script_from_recording_surface (script, surface) == CAIRO_STATUS_SUCCESS)
|
||||
{
|
||||
_indent (p);
|
||||
g_string_append (p->str, "script: url(\"data:;base64,");
|
||||
g_string_append (p->str, "script: url(\"data:;base64,\\\n");
|
||||
b64 = base64_encode_with_linebreaks (array->data, array->len);
|
||||
append_escaping_newlines (p->str, b64);
|
||||
g_free (b64);
|
||||
|
||||
@@ -32,8 +32,12 @@
|
||||
* `GtkBuilderListItemFactory` is a `GtkListItemFactory` that creates
|
||||
* widgets by instantiating `GtkBuilder` UI templates.
|
||||
*
|
||||
* The templates must be extending `GtkListItem`, and typically use
|
||||
* `GtkExpression`s to obtain data from the items in the model.
|
||||
* The templates must extend the class that the parent widget expects.
|
||||
* For example, a factory provided to [property@Gtk.ListView:factory] must have
|
||||
* a template that extends [class@Gtk.ListItem].
|
||||
*
|
||||
* Templates typically use `GtkExpression`s to obtain data from the items
|
||||
* in the model.
|
||||
*
|
||||
* Example:
|
||||
* ```xml
|
||||
@@ -203,7 +207,7 @@ gtk_builder_list_item_factory_set_property (GObject *object,
|
||||
case PROP_RESOURCE:
|
||||
{
|
||||
GError *error = NULL;
|
||||
GBytes *bytes;
|
||||
GBytes *bytes;
|
||||
const char *resource;
|
||||
|
||||
resource = g_value_get_string (value);
|
||||
|
||||
@@ -861,6 +861,8 @@ gtk_column_view_class_init (GtkColumnViewClass *klass)
|
||||
*
|
||||
* The factory used for configuring rows.
|
||||
*
|
||||
* The factory must be for configuring [class@Gtk.ColumnViewRow] objects.
|
||||
*
|
||||
* Since: 4.12
|
||||
*/
|
||||
properties[PROP_ROW_FACTORY] =
|
||||
@@ -926,6 +928,8 @@ gtk_column_view_class_init (GtkColumnViewClass *klass)
|
||||
*
|
||||
* Factory for creating header widgets.
|
||||
*
|
||||
* The factory must be for configuring [class@Gtk.ListHeader] objects.
|
||||
*
|
||||
* Since: 4.12
|
||||
*/
|
||||
properties[PROP_HEADER_FACTORY] =
|
||||
|
||||
@@ -255,6 +255,8 @@ gtk_column_view_column_class_init (GtkColumnViewColumnClass *klass)
|
||||
* GtkColumnViewColumn:factory: (attributes org.gtk.Property.get=gtk_column_view_column_get_factory org.gtk.Property.set=gtk_column_view_column_set_factory)
|
||||
*
|
||||
* Factory for populating list items.
|
||||
*
|
||||
* The factory must be for configuring [class@Gtk.ColumnViewCell] objects.
|
||||
*/
|
||||
properties[PROP_FACTORY] =
|
||||
g_param_spec_object ("factory", NULL, NULL,
|
||||
@@ -761,7 +763,7 @@ gtk_column_view_column_remove_from_sorter (GtkColumnViewColumn *self)
|
||||
{
|
||||
if (self->view == NULL)
|
||||
return;
|
||||
|
||||
|
||||
gtk_column_view_sorter_remove_column (GTK_COLUMN_VIEW_SORTER (gtk_column_view_get_sorter (self->view)), self);
|
||||
}
|
||||
|
||||
|
||||
@@ -1109,6 +1109,8 @@ gtk_grid_view_class_init (GtkGridViewClass *klass)
|
||||
* GtkGridView:factory: (attributes org.gtk.Property.get=gtk_grid_view_get_factory org.gtk.Property.set=gtk_grid_view_set_factory)
|
||||
*
|
||||
* Factory for populating list items.
|
||||
*
|
||||
* The factory must be for configuring [class@Gtk.ListItem] objects.
|
||||
*/
|
||||
properties[PROP_FACTORY] =
|
||||
g_param_spec_object ("factory", NULL, NULL,
|
||||
|
||||
@@ -881,6 +881,8 @@ gtk_list_view_class_init (GtkListViewClass *klass)
|
||||
* GtkListView:factory: (attributes org.gtk.Property.get=gtk_list_view_get_factory org.gtk.Property.set=gtk_list_view_set_factory)
|
||||
*
|
||||
* Factory for populating list items.
|
||||
*
|
||||
* The factory must be for configuring [class@Gtk.ListItem] objects.
|
||||
*/
|
||||
properties[PROP_FACTORY] =
|
||||
g_param_spec_object ("factory", NULL, NULL,
|
||||
@@ -892,6 +894,8 @@ gtk_list_view_class_init (GtkListViewClass *klass)
|
||||
*
|
||||
* Factory for creating header widgets.
|
||||
*
|
||||
* The factory must be for configuring [class@Gtk.ListHeader] objects.
|
||||
*
|
||||
* Since: 4.12
|
||||
*/
|
||||
properties[PROP_HEADER_FACTORY] =
|
||||
@@ -1355,7 +1359,7 @@ gtk_list_view_get_tab_behavior (GtkListView *self)
|
||||
* @pos: position of the item
|
||||
* @flags: actions to perform
|
||||
* @scroll: (nullable) (transfer full): details of how to perform
|
||||
* the scroll operation or %NULL to scroll into view
|
||||
* the scroll operation or %NULL to scroll into view
|
||||
*
|
||||
* Scrolls to the item at the given position and performs the actions
|
||||
* specified in @flags.
|
||||
|
||||
@@ -1774,6 +1774,10 @@ populate_event_properties (GListStore *store,
|
||||
case GDK_KEY_RELEASE:
|
||||
{
|
||||
char *tmp;
|
||||
|
||||
tmp = modifier_names (gdk_key_event_get_consumed_modifiers (event));
|
||||
add_text_row (store, "Consumed modifiers", "%s", tmp);
|
||||
g_free (tmp);
|
||||
add_int_row (store, "Keycode", gdk_key_event_get_keycode (event));
|
||||
add_int_row (store, "Keyval", gdk_key_event_get_keyval (event));
|
||||
tmp = key_event_string (event);
|
||||
|
||||
@@ -52,31 +52,3 @@ test('transition', transition,
|
||||
suite: 'css'
|
||||
)
|
||||
|
||||
if false and get_option ('profiler')
|
||||
|
||||
adwaita_env = csstest_env
|
||||
adwaita_env.set('GTK_THEME', 'Adwaita')
|
||||
test('performance-adwaita', test_performance,
|
||||
args: [
|
||||
'--mark', 'css validation',
|
||||
'--name', 'performance-adwaita',
|
||||
'--output', join_paths(meson.current_build_dir(), 'output'),
|
||||
join_paths(meson.current_build_dir(), '../../demos/widget-factory/gtk4-widget-factory'),
|
||||
],
|
||||
env: adwaita_env,
|
||||
suite: [ 'css' ],
|
||||
)
|
||||
|
||||
empty_env = csstest_env
|
||||
empty_env.set('GTK_THEME', 'Empty')
|
||||
test('performance-empty', test_performance,
|
||||
args: [
|
||||
'--mark', 'css validation',
|
||||
'--name', 'performance-empty',
|
||||
'--output', join_paths(meson.current_build_dir(), 'output'),
|
||||
join_paths(meson.current_build_dir(), '../../demos/widget-factory/gtk4-widget-factory'),
|
||||
],
|
||||
env: empty_env,
|
||||
suite: [ 'css' ],
|
||||
)
|
||||
endif
|
||||
|
||||
41
testsuite/gsk/compare/empty-fallback.node
Normal file
41
testsuite/gsk/compare/empty-fallback.node
Normal file
@@ -0,0 +1,41 @@
|
||||
clip {
|
||||
/* Numbers that trigger rounding errors at 125%:
|
||||
9, 13, 18, 21, 26, 31, 36, 42, 47, 52, 57, 62, 67, 72, 77, 84, 89, 94, 99, ...
|
||||
*/
|
||||
clip: 0 0 9 13;
|
||||
child: transform {
|
||||
/* This is a typical fractional scale factor. It is 5/4.
|
||||
The inverse is 4/5, and that number cannot be represented as
|
||||
a float.
|
||||
The renderer does however operate in the scaled coordinate system,
|
||||
So this will translate the clip rect above to the scaled clip rect
|
||||
0 0 7.20000029 10.4000006
|
||||
*/
|
||||
transform: scale(1.25);
|
||||
child: container {
|
||||
/* This color node exists just so that the bounds of the clipped node
|
||||
are large enough. Otherwise the node bounds computation might end
|
||||
up detecting that the clip is actually empty, because it scales
|
||||
the other way: It multiplies by 1.25, not by 0.8.
|
||||
*/
|
||||
color {
|
||||
color: black;
|
||||
bounds: 0 0 50 50;
|
||||
}
|
||||
/* This node has bounds of 7.2 0 10 10 - which gets translated to
|
||||
7.19999981 0 10.000001 10 during parsing of the path.
|
||||
|
||||
And because 7.19999981 < 7.20000029 this node might not be considered
|
||||
fully clipped, even though it really should be.
|
||||
*/
|
||||
fill {
|
||||
path: "M 7.2 0 l 10 0 l 0 10 l -10 0 z";
|
||||
child: color {
|
||||
color: red;
|
||||
bounds: 0 0 50 50;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BIN
testsuite/gsk/compare/empty-fallback.png
Normal file
BIN
testsuite/gsk/compare/empty-fallback.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 81 B |
@@ -73,6 +73,7 @@ compare_render_tests = [
|
||||
'empty-shadow',
|
||||
'empty-texture',
|
||||
'empty-transform',
|
||||
'empty-fallback',
|
||||
'fill',
|
||||
'fill2',
|
||||
'fill-clipped-nogl',
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
texture-scale {
|
||||
bounds: 0 0 50 50;
|
||||
texture: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAKUlEQVQYlWP8z3DmPwMaYGQwYUQX\
|
||||
texture: url("data:image/png;base64,\
|
||||
iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAKUlEQVQYlWP8z3DmPwMaYGQwYUQX\
|
||||
Y0IXwAUGUCGGoxkYGBiweXAoeAYAz44F3e3U1xUAAAAASUVORK5CYII=\
|
||||
");
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
texture {
|
||||
bounds: 0 0 50 50;
|
||||
texture: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAKUlEQVQYlWP8z3DmPwMaYGQwYUQX\
|
||||
texture: url("data:image/png;base64,\
|
||||
iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAKUlEQVQYlWP8z3DmPwMaYGQwYUQX\
|
||||
Y0IXwAUGUCGGoxkYGBiweXAoeAYAz44F3e3U1xUAAAAASUVORK5CYII=\
|
||||
");
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
text {
|
||||
font: "text-mixed-color 10px" url("data:font/ttf;base64,AAEAAAAKAIAAAwAgQ09MUgATAEEAAAJ8AAAALENQQUwB/wATAAACqAAAABpjbWFwAHcAPQAAATwA\
|
||||
font: "text-mixed-color 10px" url("data:font/ttf;base64,\
|
||||
AAEAAAAKAIAAAwAgQ09MUgATAEEAAAJ8AAAALENQQUwB/wATAAACqAAAABpjbWFwAHcAPQAAATwA\
|
||||
AAA0Z2x5Zu8g4kAAAAGEAAAA0mhlYWQmofyJAAAArAAAADZoaGVhDAEEAgAAAOQAAAAkaG10eAQA\
|
||||
AQAAAAEoAAAAFGxvY2EAyAD5AAABcAAAABRtYXhwAAwACQAAAQgAAAAgbmFtZX7VdrQAAAJYAAAA\
|
||||
IgABAAAAARmajs74k18PPPUAAggAAAAAAOHCPQAAAAAA4cpY+QAAAAAEAAgAAAAAAQACAAAAAAAA\
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
text {
|
||||
font: "text-mixed-color 10px" url("data:font/ttf;base64,AAEAAAAKAIAAAwAgQ09MUgATAEEAAAJ8AAAALENQQUwB/wATAAACqAAAABpjbWFwAHcAPQAAATwA\
|
||||
font: "text-mixed-color 10px" url("data:font/ttf;base64,\
|
||||
AAEAAAAKAIAAAwAgQ09MUgATAEEAAAJ8AAAALENQQUwB/wATAAACqAAAABpjbWFwAHcAPQAAATwA\
|
||||
AAA0Z2x5Zu8g4kAAAAGEAAAA0mhlYWQmofyJAAAArAAAADZoaGVhDAEEAgAAAOQAAAAkaG10eAQA\
|
||||
AQAAAAEoAAAAFGxvY2EAyAD5AAABcAAAABRtYXhwAAwACQAAAQgAAAAgbmFtZX7VdrQAAAJYAAAA\
|
||||
IgABAAAAARmajs74k18PPPUAAggAAAAAAOHCPQAAAAAA4cpY+QAAAAAEAAgAAAAAAQACAAAAAAAA\
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
texture {
|
||||
bounds: 0 0 50 50;
|
||||
texture: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAKUlEQVQYlWP8z3DmPwMaYGQwYUQX\
|
||||
texture: url("data:image/png;base64,\
|
||||
iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAKUlEQVQYlWP8z3DmPwMaYGQwYUQX\
|
||||
Y0IXwAUGUCGGoxkYGBiweXAoeAYAz44F3e3U1xUAAAAASUVORK5CYII=\
|
||||
");
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
texture {
|
||||
bounds: 0 0 1 1;
|
||||
texture: "texture1" url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWP4z8DwHwAFAAH/q842\
|
||||
texture: "texture1" url("data:image/png;base64,\
|
||||
iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWP4z8DwHwAFAAH/q842\
|
||||
iQAAAABJRU5ErkJggg==\
|
||||
");
|
||||
}
|
||||
|
||||
@@ -1,26 +1,30 @@
|
||||
texture-scale {
|
||||
bounds: 0 0 50 50;
|
||||
texture: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGElEQVQYlWP8z8Dwn4EIwESMolGF\
|
||||
texture: url("data:image/png;base64,\
|
||||
iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGElEQVQYlWP8z8Dwn4EIwESMolGF\
|
||||
1FMIAD2cAhL1w47oAAAAAElFTkSuQmCC\
|
||||
");
|
||||
}
|
||||
texture-scale {
|
||||
bounds: 0 0 50 50;
|
||||
texture: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGElEQVQYlWP8z8Dwn4EIwESMolGF\
|
||||
texture: url("data:image/png;base64,\
|
||||
iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGElEQVQYlWP8z8Dwn4EIwESMolGF\
|
||||
1FMIAD2cAhL1w47oAAAAAElFTkSuQmCC\
|
||||
");
|
||||
}
|
||||
texture-scale {
|
||||
bounds: 0 0 50 50;
|
||||
filter: nearest;
|
||||
texture: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGElEQVQYlWP8z8Dwn4EIwESMolGF\
|
||||
texture: url("data:image/png;base64,\
|
||||
iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGElEQVQYlWP8z8Dwn4EIwESMolGF\
|
||||
1FMIAD2cAhL1w47oAAAAAElFTkSuQmCC\
|
||||
");
|
||||
}
|
||||
texture-scale {
|
||||
bounds: 0 0 50 50;
|
||||
filter: trilinear;
|
||||
texture: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGElEQVQYlWP8z8Dwn4EIwESMolGF\
|
||||
texture: url("data:image/png;base64,\
|
||||
iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGElEQVQYlWP8z8Dwn4EIwESMolGF\
|
||||
1FMIAD2cAhL1w47oAAAAAElFTkSuQmCC\
|
||||
");
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
texture-scale {
|
||||
bounds: 0 0 50 50;
|
||||
texture: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAKUlEQVQYlWP8z3DmPwMaYGQwYUQX\
|
||||
texture: url("data:image/png;base64,\
|
||||
iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAKUlEQVQYlWP8z3DmPwMaYGQwYUQX\
|
||||
Y0IXwAUGUCGGoxkYGBiweXAoeAYAz44F3e3U1xUAAAAASUVORK5CYII=\
|
||||
");
|
||||
}
|
||||
|
||||
@@ -277,27 +277,3 @@ make_pot = find_program ('make-pot', dirs: meson.project_source_root())
|
||||
test('potfiles', make_pot,
|
||||
workdir: meson.project_source_root(),
|
||||
suite: ['gtk', 'translations' ])
|
||||
|
||||
if false and get_option ('profiler')
|
||||
|
||||
performance_env = test_env
|
||||
performance_env.set('GTK_THEME', 'Empty')
|
||||
|
||||
test('performance-layout', test_performance,
|
||||
args: [
|
||||
'--mark', 'size allocation',
|
||||
join_paths(meson.current_build_dir(), '../../demos/widget-factory/gtk4-widget-factory'),
|
||||
],
|
||||
env: performance_env,
|
||||
suite: [ 'gtk' ],
|
||||
)
|
||||
|
||||
test('performance-snapshot', test_performance,
|
||||
args: [
|
||||
'--mark', 'widget snapshot',
|
||||
join_paths(meson.current_build_dir(), '../../demos/widget-factory/gtk4-widget-factory'),
|
||||
],
|
||||
env: performance_env,
|
||||
suite: [ 'gtk' ],
|
||||
)
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user