Commit Graph

69287 Commits

Author SHA1 Message Date
Jason Francis
cd77485193
gtk: Allow selection models to take null list model during construction
This brings it in line with the documentation, and with the respective
set_model() functions.
2021-03-15 15:55:47 -04:00
Matthias Clasen
ec0e76dabd Merge branch 'issue-3757' into 'master'
docs: Update annotations for WidgetClass.query_action()

Closes #3757

See merge request GNOME/gtk!3301
2021-03-15 19:28:17 +00:00
Emmanuele Bassi
0a7af75639 docs: Update annotations for WidgetClass.query_action()
The parameter_type and property_name out arguments can be set to NULL.

Fixes: #3757
2021-03-15 13:48:35 +00:00
Milo Casagrande
72012113fd Update Italian translation
(cherry picked from commit affeff5472)
2021-03-15 09:25:36 +00:00
Matthias Clasen
3daad8fe87 release-script: Actually compress the docs tarball
Somehow an x got lot and the tarball got very big. Oops...
2021-03-14 23:33:10 -04:00
Benjamin Otte
a1c1ad317b Merge branch 'wip/otte/for-master' into 'master'
Wip/otte/for master

See merge request GNOME/gtk!3297
2021-03-15 02:31:45 +00:00
Benjamin Otte
dbd19bf27a x11: Don't call _gdk_surface_update_size() all the time
We were calling _gdk_surface_update_size() every frame, even if the
window size didn't change. This would cause us to discard all cached
buffers and redraw the whole screen.

This was BAD.
2021-03-15 03:16:50 +01:00
Benjamin Otte
97fad45237 surface: Remove unused gdk_surface_get_unscaled_size()
Also remove unscaled_width/height members in the win32 backend.

Both of those are unused.
2021-03-15 02:56:28 +01:00
Matthias Clasen
cbda61d3fb 4.1.2 2021-03-14 21:48:48 -04:00
Matthias Clasen
afe195a862 Update release script
With gi-docgen based docs, we can try to go back to
including the docs in the main release tarball.
2021-03-14 21:48:46 -04:00
Matthias Clasen
e6adee2403 Merge branch 'menubar-accel' into 'master'
window: Add a way to disable F10 shortcut

Closes #3727

See merge request GNOME/gtk!3296
2021-03-15 01:27:45 +00:00
Benjamin Otte
1fd534ef1e ngl: Remove duplicate check
We check the extents, so there's no need to check overlap before.
2021-03-15 01:30:34 +01:00
Matthias Clasen
cfc91b62b0 window: Add a way to disable F10 shortcut
This is needed for terminal emulators.

Fixes: #3727
2021-03-14 19:47:06 -04:00
Matthias Clasen
24ec2cc6a6 Merge branch 'ngl-less-shaders' into 'master'
Assorted ngl improvements

See merge request GNOME/gtk!3295
2021-03-14 21:04:37 +00:00
Matthias Clasen
28de2eecc9 ngl: Special-case css backgrounds
Recognize a common pattern: A rounded clip with
a color node, followed by a border node, with the
same outline. This is what CSS backgrounds frequently
produce, and we can render it more efficiently with
a combined shader.
2021-03-14 16:49:31 -04:00
Matthias Clasen
ed3f0012b1 ngl: Don't bother with uniform border nodes
Now that colors aren't uniforms anymore, we don't
win much by using the inset_shadow shader. The fragment
shaders of inset_shadow and border are identical. And
the regular border setup does nine-slicing.
2021-03-14 16:49:31 -04:00
Matthias Clasen
51074ca5df ngl: Small shader improvements
Add a variant of gskSetOutputColor that saves a
few multiplications, and use it where possible.
2021-03-14 16:49:31 -04:00
Matthias Clasen
8aac574d63 ngl: Improve the coloring shader
Since we are now passing a float anyway, we can avoid
the branch in the fragment shader.
2021-03-14 16:49:31 -04:00
Matthias Clasen
c1f98d6837 ngl: Improve the gradient shaders
Use a define for MAX_COLOR_STOPS, and give the loop
a fixed limit.
2021-03-14 16:49:31 -04:00
Matthias Clasen
3f60c39de4 ngl: Rewrite gsk_ngl_render_job_visit_text_node
Make this more compact, and thus easier to read.
2021-03-14 16:49:31 -04:00
Matthias Clasen
4aa570ba88 ngl: Drop gsk_ngl_render_job_set_color
Colors are not state that we carry across draw ops,
so setting the color on the render job doesn't make
much sense. Instead, pass the color to the various
draw calls. Add a few new ones for that purpose.

Also, shorten the names of some by going from
'load_vertices_from_offscreen' to 'draw_offscreen'.
2021-03-14 16:49:31 -04:00
Matthias Clasen
233969e9e4 ngl: Refactor gsk_ngl_render_job_visit_border_node
With color sorting out of the picture, this can
be much simpler.
2021-03-14 16:49:31 -04:00
Matthias Clasen
19e3a6af5d ngl: Consistently use gsk_scaled_premultiply
Its not going to make much of a difference, but we
can just as well be consistent.
2021-03-14 16:49:31 -04:00
Matthias Clasen
29501f5398 ngl: Fix up uniform enums
This got messed up when color was changed from
a uniform to an attribute in 06d5c8e72d.
2021-03-14 16:49:31 -04:00
Jiri Grönroos
3408240ba6 Update Finnish translation
(cherry picked from commit f5a34b53af)
2021-03-14 17:03:07 +00:00
Guillaume Bernard
e6725aa16f Update French translation
(cherry picked from commit 21039681d6)
2021-03-14 13:38:24 +00:00
Piotr Drąg
f34c0f4a99 Update Polish translation 2021-03-14 13:30:26 +01:00
Marek Černocký
52c7fd166b Updated Czech translation 2021-03-14 09:28:17 +01:00
Matthias Clasen
346b29ad8f Merge branch 'gles-coloring' into 'master'
ngl: Fix the coloring shader on GLES 2.0

See merge request GNOME/gtk!3294
2021-03-13 22:27:04 +00:00
Emmanuel Gil Peyrot
064947356a ngl: Fix the coloring shader on GLES 2.0
Integer varyings didn’t exist in GLSL ES 1.00, neither did the flat
attribute.
2021-03-13 22:00:54 +00:00
Kjartan Maraas
d2258fb316 Update Norwegian Bokmål translation
(cherry picked from commit 70ee21db71)
2021-03-13 16:05:15 +00:00
Matthias Clasen
dda66d580f Merge branch 'ebassi/for-master' into 'master'
docs: Fix the dependencies links

See merge request GNOME/gtk!3284
2021-03-13 12:36:56 +00:00
Matthias Clasen
1d773df9f2 Merge branch 'ngl-textview-cursor' into 'master'
Ngl textview cursor

See merge request GNOME/gtk!3292
2021-03-13 12:33:15 +00:00
Matthias Clasen
9be2f130f0 textview: Fix blinking block cursors
When we have a block cursor, we need to discard the
cached node of the line containing the cursor, in order
to get a blinking cursor.
2021-03-12 21:50:07 -05:00
Matthias Clasen
e345f9a4db textview: Fix blinking block cursors
When we have a block cursor, we need to discard the
cached node of the line containing the cursor, in order
to get a blinking cursor.
2021-03-12 19:44:31 -05:00
Matthias Clasen
3a928c8980 textlayout: Render cursors at the end
Don't place the insertion cursor render nodes in the
middle of the text nodes for all the text. This helps
the renderer batching the text draw calls together.
2021-03-12 19:28:36 -05:00
Matthias Clasen
42dfc21b2d ngl: Fix up some debug printouts 2021-03-12 18:26:15 -05:00
Matthias Clasen
daed57c30e Merge branch 'wip/chergert/fewer-uniforms' into 'master'
ngl: apply fewer uniforms

See merge request GNOME/gtk!3289
2021-03-12 22:55:00 +00:00
Matthias Clasen
de0860c1bf Merge branch 'pgriffis/readme-fixes' into 'master'
readme: Fix broken doc links

See merge request GNOME/gtk!3291
2021-03-12 22:51:16 +00:00
Patrick Griffis
4fbc63f50a readme: Fix broken doc links 2021-03-12 22:02:55 +00:00
Matthias Clasen
3e1524fade Merge branch 'ngl-vertex-attributes' into 'master'
Ngl vertex attributes

See merge request GNOME/gtk!3290
2021-03-12 21:26:52 +00:00
Matthias Clasen
ebe30d851b ngl: Identify shaders
Add a comment with a name to each shader. That makes
identifying the shaders in apitrace much easier.
2021-03-12 15:35:40 -05:00
Christian Hergert
f97ce21e59 ngl: reintroduce comparison checks
This reduces how many changes we make when recording uniform state, which
increases the chances that the data offset will be the same when applying
uniforms.
2021-03-12 11:47:15 -08:00
Christian Hergert
0b7d8e19c3 ngl: add front cache to reduce uniform changes
Since we make full snapshots when recording uniform state of batches, we
need to perform some deduplication to avoid so many repeated uniform calls.

This uses a closed hashtable to determine if we are likely changing the
value to something new.

This does not currently compare values, it instead only compares that we
are going to point at a new offset into the uniform buffer. We could go
further if we compare upon updating values (we did that early on in the
prototype) so that offsets are less likely to be changed.
2021-03-12 11:22:59 -08:00
Matthias Clasen
0ee6868b7f gtk-demo: Add a test for scrolling with Emoji
Make a text with lots of Emoji and text. This
is exercising the GL renderers switching between
different shaders for color and plain glyphs.
2021-03-12 13:19:37 -05:00
Matthias Clasen
6a30c6b01c ngl: Make the coloring shader more versatile
When the color passed is transparent black, use
the color from the texture as source, instead of
as mask. This lets use use the coloring program
both for regular and color glyphs, avoiding
program changes in text with Emoji.
2021-03-12 13:19:37 -05:00
Matthias Clasen
06d5c8e72d ngl: Set color as vertex attribute
Instead of using uniforms for color used in multiple
programs, pass it as vertex attributes. This will let
us batch more draw calls, since we don't have to change
uniforms so often. In particular, for syntax-highlighted
text.
2021-03-12 13:18:47 -05:00
Matthias Clasen
3252f1e301 gsk: Give ngl its own shader sources
We may want to change the interface between the
shaders and the renderer for ngl, and therefore,
sharing the shaders between gl and ngl will not
be practical, going forward.
2021-03-12 13:18:47 -05:00
Matthias Clasen
7f292d34bd Merge branch 'fix-3704' into 'master'
gdksurface-win32.c: Fix window menu positioning (issue #3704)

Closes #3704

See merge request GNOME/gtk!3286
2021-03-12 14:06:33 +00:00
Emmanuele Bassi
7c29847fbf build: Install the API references
We are building them, but not installing them.
2021-03-12 11:32:09 +00:00