| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
| |
Some versions are specfied in multiple places.
Add a reminder to update all places.
|
|\
| |
| |
| |
| | |
Vulkan fractional scale support, image layout and clip region fixes, cleanups
See merge request GNOME/gtk!5783
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| | |
No functional changes. Use a variable that already exists instead
of calling gdk_draw_context_get_surface() again. Cleanup some
newlines.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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().
|
| |
| |
| |
| |
| |
| | |
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).
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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".
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
|\ \
| | |
| | |
| | |
| | | |
gtklistbox: Add remove_all()
See merge request GNOME/gtk!5779
|
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | |
| | | |
Adds a function to remove all children from
a GtkListBox. This way app developers don't need to
implement this themselves.
|
|\ \ \
| | | |
| | | |
| | | |
| | | | |
build: We need wayland-protocols 1.31
See merge request GNOME/gtk!5780
|
| | |/
| |/|
| | | |
https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/5767
|
|/ / |
|
|\ \
| | |
| | |
| | |
| | | |
tooltipwindow: Cast the correct object
See merge request GNOME/gtk!5774
|
| | |
| | |
| | |
| | | |
the tooltipwindow is in the userdata.
|
|\ \ \
| |/ /
|/| /
| |/
| | |
docs: Document new environment variables
See merge request GNOME/gtk!5777
|
| | |
|
| |
| |
| |
| |
| | |
Add GSK_MAX_TEXTURE_SIZE and GDK_DEBUG=gl-fractional
to the docs.
|
|\ \
| |/
|/|
| |
| | |
wayland: Be more careful about scale-factor
See merge request GNOME/gtk!5775
|
| |
| |
| |
| |
| |
| | |
Only emit notify::scale-factor if it actually
changes. This potentially avoids a lot of work
in GTK (reloading icons, etc).
|
| | |
|
|\ \
| |/
|/|
| |
| | |
Documentation corrections for GtkTextIter
See merge request GNOME/gtk!5776
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
| 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]" |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
| 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]" |
|
| | |
|
|\ \
| |/
|/|
| |
| | |
dropdown: Fix to work with recent listview changes
See merge request GNOME/gtk!5773
|
| |
| |
| |
| |
| | |
Introduce our own 'inertness' for the list item widget
that shows the selected value inside the button.
|
|\ \
| |/
| |
| |
| | |
Make fractional scaling work with the GL renderer
See merge request GNOME/gtk!5770
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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().
|
| |
| |
| |
| |
| | |
Rename scale_factor to scale in various places,
now that it is no longer an int but a float.
|
| | |
|
|\ \
| |/
| |
| |
| | |
examples: Update for deprecations
See merge request GNOME/gtk!5772
|
|/
|
|
| |
Stop using gdk_surface_create_similar_surface here.
|
|\
| |
| |
| |
| | |
popover: Stop using gdk_surface_create_similar_surface
See merge request GNOME/gtk!5771
|
| |
| |
| |
| |
| | |
This function is part of the cairo drawing API and
we are moving away from that. Update all callers.
|
| |
| |
| |
| | |
Just create the cairo image surface ourselves.
|
|/ |
|
|\
| |
| |
| |
| | |
Add gdk_surface_get_scale
See merge request GNOME/gtk!5769
|
| |
| |
| |
| |
| | |
For Wayland surfaces, show the fractional scale
if we have it.
|
| |
| |
| |
| |
| | |
Add a scale property to GdkSurface and use the
fractional scale for it on Wayland.
|
| | |
|
|\ \
| |/
|/|
| |
| | |
GtkColumnView factories and focus rework
See merge request GNOME/gtk!5728
|
| | |
|