summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* 4.11.14.11.1Matthias Clasen2023-04-031-1/+1
|
* NEWS: UpdatesMatthias Clasen2023-04-031-0/+1
|
* Add comment on versionsMatthias Clasen2023-04-031-0/+1
| | | | | Some versions are specfied in multiple places. Add a reminder to update all places.
* Merge branch 'gbsneto/vulkan-layout-fixes' into 'main'Benjamin Otte2023-04-037-39/+91
|\ | | | | | | | | Vulkan fractional scale support, image layout and clip region fixes, cleanups See merge request GNOME/gtk!5783
| * vulkan: Support fractional scalingGeorges Basile Stavracas Neto2023-04-033-26/+29
| | | | | | | | | | | | | | | | | | Basically what GL does, but without any debug or feature flag to gatekeep it, since the Vulkan backend itself is experimental already. Ceil surface sizes, and floor coordinates, to the fractional scale value.
| * gsk/vulkan/renderpass: Don't scale scissor and render areaGeorges Basile Stavracas Neto2023-04-031-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | The rects passed to the clip region are in buffer coordinates, and must not be scaled. Consider the following scenario: Wayland, with a 1024x768@2 window. That gives us a 2048x1536 raw image. To setup the Vulkan render pass code, we'd scale 2048x1536 *again*, to an unreasonable 4196x3072, which is (1) incorrect and (2) really incorrect and (3) can lead to crashes at best, full GPU resets at worst - and a GPU reset is incredibly not fun! Now that we pass the right clip regions at the right coordinates at all times, remove the extra scaling from the render pass.
| * gsk/vulkan: CosmeticsGeorges Basile Stavracas Neto2023-04-032-10/+5
| | | | | | | | | | | | No functional changes. Use a variable that already exists instead of calling gdk_draw_context_get_surface() again. Cleanup some newlines.
| * gsk/vulkan/renderer: Pass appropriate clip regionGeorges Basile Stavracas Neto2023-04-031-3/+56
| | | | | | | | | | | | | | | | | | | | | | | | This part of the Vulkan renderer is almost exactly equal to the GL renderer, and the GL renderer already does that since at least 2a38cecd3351. Copy that into the Vulkan renderer. A nice side effect from this commit is that resizing a window now actually works again. Sneak in a trivial cleanup by using a variable to hold the draw index.
| * gsk/vulkan/buffer: Pass aligned memory valueGeorges Basile Stavracas Neto2023-04-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was a tricky one to figure out, but it's pretty simple to understand (I hope!). So, this AMD card I'm using requires buffer memory sizes to be aligned to 16 bytes. Intel is aligned to 4 bytes I think, but AMD - or at least this AMD model in particular - uses 16 bytes for alignment. When creating a a particular texture (I did not determin which one specifically!) a buffer of size 1276 bytes is requested. 1276 / 16 = 79.75, which is clearly not aligned to the required 16 bytes. We request Vulkan to create a buffer of 1276 bytes for us, it figures out that it's not aligned, and creates a buffer of 1280 bytes, which is aligned. The extra 4 bytes are wasted, but that's okay. We immediately query this buffer for this exact information, using vkGetBufferMemoryRequirements(), and proceed to create actual memory to back this buffer up. The buffer tells us we must use 1280 bytes, so we pass 1280 bytes and everyone is happy, right? Of course not. We pass 1276 bytes, and Vulkan is subtly unhappy at us. Fix that by passing the value that Vulkan asks us to use, i.e., the size returned by vkGetBufferMemoryRequirements().
| * gsk/vulkan/glyphcache: Ceil glyph surface sizeGeorges Basile Stavracas Neto2023-04-031-2/+2
| | | | | | | | | | | | This is what GL does, and for a reason: it can lead to width or height for very small glyphs. Also, switch to dividing by a float (1024.0) instead of an integer (1024).
| * gsk/vulkanimage: Set buffer row length and heightGeorges Basile Stavracas Neto2023-04-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This doesn't make any difference now, but will allow us to copy subregions more easily. This is not obvious, but here's a quick explanation: Leaving 'bufferRowLength' and 'bufferImageHeight' implies that Vulkan will assume the size passed in the 'imageExtent' field. Right now, this assumption is correct - the only user of this function is the glyph cache, and it only copies and uploads exact rects. Next commits will change that assumption, so we must pass 'buffer*' fields, and tell Vulkan, "this part of the buffer represents an image of width x height, and I want the subregion (x, y, smallerWidth, smallerHeight) of this image".
| * gsk/vulkan/image: Use UNDEFINED for initial layoutGeorges Basile Stavracas Neto2023-04-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When creating an image using gsk_vulkan_image_new_for_framebuffer(), it passes VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL. However, this is a mistake. The spec demands that the initial layout must be either VK_IMAGE_LAYOUT_UNDEFINED or VK_IMAGE_LAYOUT_PREINITIALIZED. Apparently this was an oversight from commit b97fb751469, since the commit message even documents that, and all other calls pass either VK_IMAGE_LAYOUT_UNDEFINED or VK_IMAGE_LAYOUT_PREINITIALIZED. Create framebuffer images using VK_IMAGE_LAYOUT_UNDEFINED, which is what was originally expected.
| * gsk/vulkan/image: CosmeticsGeorges Basile Stavracas Neto2023-04-021-2/+1
| |
* | Merge branch 'listbox-remove-all' into 'main'Matthias Clasen2023-04-034-4/+58
|\ \ | | | | | | | | | | | | gtklistbox: Add remove_all() See merge request GNOME/gtk!5779
| * | gtkflowbox: Add remove_all()Christopher Davis2023-04-022-0/+29
| | | | | | | | | | | | | | | | | | Removing all items from containers is a common use case. Without this applications needed to implement this manually. It makes senses to handle it here.
| * | gtklistbox: Add remove_all()Christopher Davis2023-04-022-4/+29
| | | | | | | | | | | | | | | | | | Adds a function to remove all children from a GtkListBox. This way app developers don't need to implement this themselves.
* | | Merge branch 'zbrown/bump-protocols' into 'main'Matthias Clasen2023-04-031-1/+1
|\ \ \ | | | | | | | | | | | | | | | | build: We need wayland-protocols 1.31 See merge request GNOME/gtk!5780
| * | | build: We need wayland-protocols 1.31Zander Brown2023-04-031-1/+1
| | |/ | |/| | | | https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/5767
* | | Update Russian translationAleksandr Melman2023-04-031-318/+427
|/ /
* | Merge branch 'wip/otte/for-main' into 'main'Benjamin Otte2023-04-021-1/+1
|\ \ | | | | | | | | | | | | tooltipwindow: Cast the correct object See merge request GNOME/gtk!5774
| * | tooltipwindow: Cast the correct objectBenjamin Otte2023-04-021-1/+1
| | | | | | | | | | | | the tooltipwindow is in the userdata.
* | | Merge branch 'docs-updates' into 'main'Matthias Clasen2023-04-022-1/+13
|\ \ \ | |/ / |/| / | |/ | | docs: Document new environment variables See merge request GNOME/gtk!5777
| * NEWS: UpdatesMatthias Clasen2023-04-021-1/+3
| |
| * docs: Document new environment variablesMatthias Clasen2023-04-021-0/+10
| | | | | | | | | | Add GSK_MAX_TEXTURE_SIZE and GDK_DEBUG=gl-fractional to the docs.
* | Merge branch 'scale-factor-cleanup' into 'main'Matthias Clasen2023-04-022-6/+16
|\ \ | |/ |/| | | | | wayland: Be more careful about scale-factor See merge request GNOME/gtk!5775
| * wayland: Be more careful about scale-factorMatthias Clasen2023-04-021-5/+5
| | | | | | | | | | | | Only emit notify::scale-factor if it actually changes. This potentially avoids a lot of work in GTK (reloading icons, etc).
| * docs: Add some detailsMatthias Clasen2023-04-021-1/+11
| |
* | Merge branch 'ccook/gtkiter-doc-changes' into 'main'Matthias Clasen2023-04-021-17/+17
|\ \ | |/ |/| | | | | Documentation corrections for GtkTextIter See merge request GNOME/gtk!5776
| * Documentation corrections for GtkTextIterCam Cook2023-04-021-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | method | current | suggestion | |------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------|-----------------------------------------------------------------| | [backward_visible_cursor_position](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3785) | "Moves @iter forward to the previous visible cursor position" | "Moves @iter backward to the previous visible cursor position." | | [get_offset](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L595) | "Use [method@Gtk,TextBuffer.get_iter_at_offset]" | "Use [method@Gtk.TextBuffer.get_iter_at_offset]" | | [starts_tag](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L1201) | "returns %TRUE, [method@Gtk.TextIter.has_tag" | "returns %TRUE, [method@Gtk.TextIter.has_tag] " | | method | current | suggestion | |--------------------------------------------------------------------------------------------------------|-----------------------------------------------------|-----------------------------------------------------------| | [backward_cursor_position](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3715) | "Like gtk_text_iter_forward_cursor_position()" | "Like [method@Gtk.TextIter.forward_cursor_position]" | | [backward_find_char](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L4483) | "Same as gtk_text_iter_forward_find_char()" | "Same as [method@Gtk.TextIter.forward_find_char]" | | [backward_search](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L5295) | "Same as gtk_text_iter_forward_search()" | "Same as [method@Gtk.TextIter.forward_search]" | | [backward_sentence_starts](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3611) | "Calls gtk_text_iter_backward_sentence_start()" | "Calls [method@Gtk.TextIter.backward_sentence_start]" | | [backward_visible_word_starts](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3421) | "Calls gtk_text_iter_backward_visible_word_start()" | "Calls [method@Gtk.TextIter.backward_visible_word_start]" | | [backward_word_starts](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3345) | "Calls gtk_text_iter_backward_word_start()" | "Calls [method@Gtk.TextIter.backward_word_start]" | | [forward_sentence_ends](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3591) | "Calls gtk_text_iter_forward_sentence_end()" | "Calls [method@Gtk.TextIter.forward_sentence_end]" | | [forward_to_end](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L4131) | "gtk_text_iter_get_char() called on" | "[method@Gtk.TextIter.get_char] called on" | | [forward_visible_word_ends](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3403) | "Calls gtk_text_iter_forward_visible_word_end()" | "Calls [method@Gtk.TextIter.forward_visible_word_end]" | | [forward_word_ends](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3327) | "Calls gtk_text_iter_forward_word_end()" | " Calls [method@Gtk.TextIter.forward_word_end]" | | [is_end](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L1664) | "gtk_text_iter_is_end() is the most efficient" | "[method@Gtk.TextIter.is_end] is the most efficient" | | [set_line_index](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3900) | "Same as gtk_text_iter_set_line_offset()" | "Same as [method@Gtk.TextIter.set_line_offset]" | | [set_visible_line_index](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3987) | "Like gtk_text_iter_set_line_index()" | "Like [method@Gtk.TextIter.set_line_index]" | | [set_visible_line_offset](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3946) | "Like gtk_text_iter_set_line_offset()" | "Like [method@Gtk.TextIter.set_line_offset]" |
| * Documentation corrections for GtkTextIterCam Cook2023-04-021-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | method | current | suggestion | |------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------|-----------------------------------------------------------------| | [backward_visible_cursor_position](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3785) | "Moves @iter forward to the previous visible cursor position" | "Moves @iter backward to the previous visible cursor position." | | [get_offset](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L595) | "Use [method@Gtk,TextBuffer.get_iter_at_offset]" | "Use [method@Gtk.TextBuffer.get_iter_at_offset]" | | [starts_tag](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L1201) | "returns %TRUE, [method@Gtk.TextIter.has_tag" | "returns %TRUE, [method@Gtk.TextIter.has_tag] " | | method | current | suggestion | |--------------------------------------------------------------------------------------------------------|-----------------------------------------------------|-----------------------------------------------------------| | [backward_cursor_position](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3715) | "Like gtk_text_iter_forward_cursor_position()" | "Like [method@Gtk.TextIter.forward_cursor_position]" | | [backward_find_char](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L4483) | "Same as gtk_text_iter_forward_find_char()" | "Same as [method@Gtk.TextIter.forward_find_char]" | | [backward_search](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L5295) | "Same as gtk_text_iter_forward_search()" | "Same as [method@Gtk.TextIter.forward_search]" | | [backward_sentence_starts](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3611) | "Calls gtk_text_iter_backward_sentence_start()" | "Calls [method@Gtk.TextIter.backward_sentence_start]" | | [backward_visible_word_starts](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3421) | "Calls gtk_text_iter_backward_visible_word_start()" | "Calls [method@Gtk.TextIter.backward_visible_word_start]" | | [backward_word_starts](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3345) | "Calls gtk_text_iter_backward_word_start()" | "Calls [method@Gtk.TextIter.backward_word_start]" | | [forward_sentence_ends](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3591) | "Calls gtk_text_iter_forward_sentence_end()" | "Calls [method@Gtk.TextIter.forward_sentence_end]" | | [forward_to_end](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L4131) | "gtk_text_iter_get_char() called on" | "[method@Gtk.TextIter.get_char] called on" | | [forward_visible_word_ends](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3403) | "Calls gtk_text_iter_forward_visible_word_end()" | "Calls [method@Gtk.TextIter.forward_visible_word_end]" | | [forward_word_ends](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3327) | "Calls gtk_text_iter_forward_word_end()" | " Calls [method@Gtk.TextIter.forward_word_end]" | | [is_end](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L1664) | "gtk_text_iter_is_end() is the most efficient" | "[method@Gtk.TextBuffer.is_end] is the most efficient" | | [set_line_index](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3900) | "Same as gtk_text_iter_set_line_offset()" | "Same as [method@Gtk.TextBuffer.set_line_offset]" | | [set_visible_line_index](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3987) | "Like gtk_text_iter_set_line_index()" | "Like [method@Gtk.TextBuffer.set_line_index]" | | [set_visible_line_offset](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3946) | "Like gtk_text_iter_set_line_offset()" | "Like [method@Gtk.TextBuffer.set_line_offset]" |
* | NEWS: UpdatesMatthias Clasen2023-04-021-0/+17
| |
* | Merge branch 'dropdown-inertness' into 'main'Benjamin Otte2023-04-021-1/+26
|\ \ | |/ |/| | | | | dropdown: Fix to work with recent listview changes See merge request GNOME/gtk!5773
| * dropdown: Fix to work with recent listview changesMatthias Clasen2023-04-021-1/+26
| | | | | | | | | | Introduce our own 'inertness' for the list item widget that shows the selected value inside the button.
* | Merge branch 'gl-fractional-scale' into 'main'Matthias Clasen2023-04-0210-34/+86
|\ \ | |/ | | | | | | Make fractional scaling work with the GL renderer See merge request GNOME/gtk!5770
| * Make fractional scaling for GL opt-inMatthias Clasen2023-04-026-11/+60
| | | | | | | | | | | | | | | | Fractional scaling with the GL renderer is experimental for now, so we disable it unless GDK_DEBUG=gl-fractional is set. This will give us time to work out the kinks.
| * Use fractional scale for the GL rendererMatthias Clasen2023-04-023-12/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit combines changes in the Wayland backend, the GL context frontend, and the GL renderer to switch them all to use the fractional scale. In the Wayland backend, we now use the fractional scale to size the EGL window. In the GL frontend code, we use the fractional scale to scale the damage region and surface in begin/end_frame. And in the GL renderer, we replace gdk_surface_get_scale_factor() with gdk_surface_get_scale().
| * gsk: CosmeticsMatthias Clasen2023-04-023-11/+11
| | | | | | | | | | Rename scale_factor to scale in various places, now that it is no longer an int but a float.
| * gsk: Pass scale as float to the command queueMatthias Clasen2023-04-023-10/+10
| |
* | Merge branch 'matthiasc/for-main' into 'main'Matthias Clasen2023-04-021-4/+3
|\ \ | |/ | | | | | | examples: Update for deprecations See merge request GNOME/gtk!5772
| * examples: Update for deprecationsMatthias Clasen2023-04-021-4/+3
|/ | | | Stop using gdk_surface_create_similar_surface here.
* Merge branch 'deprecate-similar-surface' into 'main'Matthias Clasen2023-04-025-6/+15
|\ | | | | | | | | popover: Stop using gdk_surface_create_similar_surface See merge request GNOME/gtk!5771
| * Deprecate gdk_surface_create_similar_surfaceMatthias Clasen2023-04-014-1/+8
| | | | | | | | | | This function is part of the cairo drawing API and we are moving away from that. Update all callers.
| * popover: Stop using gdk_surface_create_similar_surfaceMatthias Clasen2023-04-011-5/+7
| | | | | | | | Just create the cairo image surface ourselves.
* | Update Ukrainian translationYuri Chornoivan2023-04-021-318/+442
|/
* Merge branch 'inspector-fractional-scale' into 'main'Matthias Clasen2023-04-0111-49/+118
|\ | | | | | | | | Add gdk_surface_get_scale See merge request GNOME/gtk!5769
| * inspector: Show surface scaleMatthias Clasen2023-04-012-1/+39
| | | | | | | | | | For Wayland surfaces, show the fractional scale if we have it.
| * Add gdk_surface_get_scaleMatthias Clasen2023-04-018-48/+78
| | | | | | | | | | Add a scale property to GdkSurface and use the fractional scale for it on Wayland.
| * inspector: Show the viewporter tooMatthias Clasen2023-04-011-0/+1
| |
* | Merge branch 'wip/otte/listitem-focus' into 'main'Benjamin Otte2023-04-0135-544/+2221
|\ \ | |/ |/| | | | | GtkColumnView factories and focus rework See merge request GNOME/gtk!5728
| * gtk-demo: Port to GtkColumnViewCellBenjamin Otte2023-04-012-17/+16
| |