Commit Graph

68650 Commits

Author SHA1 Message Date
Matthias Clasen
718a95c1d2 Merge branch 'matthiasc/for-master' into 'master'
composetable: Remove some redundant code

See merge request GNOME/gtk!3234
2021-02-24 01:57:47 +00:00
Matthias Clasen
cd2854a5c6 Merge branch 'wip/chergert/glproto' into 'master'
gsk: add OpenGL based GskNglRenderer

See merge request GNOME/gtk!3225
2021-02-24 01:14:14 +00:00
Fran Dieguez
86151622db Updated Galician translations 2021-02-24 01:51:12 +01:00
Matthias Clasen
915e3f0e28 composetable: Remove some redundant code
Pointed out by Peter Bloomfield.
2021-02-23 19:14:26 -05:00
Matthias Clasen
a4e7b03185 inspector: Fix a typo
When selecting the "ngl" renderer, the inspector was
saying Renderer: Unknown, due to a typo. Fix that.
2021-02-23 18:37:32 -05:00
Matthias Clasen
e9ed874231 gsk: Replace a last instance of "next"
The output of GSK_RENDERER=help was still talking about
the "next" renderer, while actually looking for "ngl".
2021-02-23 18:36:41 -05:00
Christian Hergert
2a38cecd33 gsk: add OpenGL based GskNglRenderer
The primary goal here was to cleanup the current GL renderer to make
maintenance easier going forward. Furthermore, it tracks state to allow
us to implement more advanced renderer features going forward.

Reordering

This renderer will reorder batches by render target to reduce the number
of times render targets are changed.

In the future, we could also reorder by program within the render target
if we can determine that vertices do not overlap.

Uniform Snapshots

To allow for reordering of batches all uniforms need to be tracked for
the programs. This allows us to create the full uniform state when the
batch has been moved into a new position.

Some care was taken as it can be performance sensitive.

Attachment Snapshots

Similar to uniform snapshots, we need to know all of the texture
attachments so that we can rebind them when necessary.

Render Jobs

To help isolate the process of creating GL commands from the renderer
abstraction a render job abstraction was added. This could be extended
in the future if we decided to do tiling.

Command Queue

Render jobs create batches using the command queue. The command queue
will snapshot uniform and attachment state so that it can reorder
batches right before executing them.

Currently, the only reordering done is to ensure that we only visit
each render target once. We could extend this by tracking vertices,
attachments, and others.

This code currently uses an inline array helper to reduce overhead
from GArray which was showing up on profiles. It could be changed to
use GdkArray without too much work, but had roughly double the
instructions. Cycle counts have not yet been determined.

GLSL Programs

This was simplified to use XMACROS so that we can just extend one file
(gskglprograms.defs) instead of multiple places. The programs are added
as fields in the driver for easy access.

Driver

The driver manages textures, render targets, access to atlases,
programs, and more. There is one driver per display, by using the
shared GL context.

Some work could be done here to batch uploads so that we make fewer
calls to upload when sending icon theme data to the GPU. We'd need
to keep a copy of the atlas data for such purposes.
2021-02-23 14:41:52 -08:00
Ask Hjorth Larsen
9698d4aa2a Updated Danish translation of gtk-properties 2021-02-23 01:23:03 +01:00
Ask Hjorth Larsen
dd2851a0ff Updated Danish translation 2021-02-23 01:23:03 +01:00
Matthias Clasen
700f39bfca Merge branch 'compose-warning' into 'master'
imcontext: Take out the warnings

See merge request GNOME/gtk!3230
2021-02-22 20:31:19 +00:00
Matthias Clasen
baec7079e0 imcontext: Take out the warnings
Don't warn about Compose file constructs we don't
support. We haven't supported these for a long time,
and nobody has every complained. No need to wake
up sleeping dogs.
2021-02-22 15:08:58 -05:00
Timm Bäder
f83644edee Merge branch 'SilverRainZ-master-patch-42810' into 'master'
gtk-demo: Fix typo GtkKabel -> GtkLabel

See merge request GNOME/gtk!3229
2021-02-22 08:20:34 +00:00
Emin Tufan Çetin
30d4417064 Update Turkish translation 2021-02-21 17:56:30 +00:00
Emin Tufan Çetin
b428fafade Update Turkish translation 2021-02-21 17:51:14 +00:00
Emin Tufan Çetin
63d1dc307a Update Turkish translation 2021-02-21 16:27:09 +00:00
Shengyu Zhang
55bfadadc4 gtk-demo: Fix typo GtkKabel -> GtkLabel 2021-02-21 16:20:22 +00:00
Piotr Drąg
179fae32a5 Update POTFILES.in 2021-02-21 12:50:44 +01:00
Matthias Clasen
e220b24b70 Merge branch 'wip/chergert/macos-gl-opaque-context' into 'master'
macos: make OpenGL context opaque when possible

See merge request GNOME/gtk!3226
2021-02-20 02:37:52 +00:00
Matthias Clasen
9061256122 Merge branch 'wip/chergert/fix-macos-resizing' into 'master'
macos: fix resizing of resizable windows on macOS

See merge request GNOME/gtk!3227
2021-02-20 02:32:15 +00:00
Christian Hergert
ea0d487f0b macos: fix resizing of resizable windows on macOS 2021-02-19 15:43:49 -08:00
Christian Hergert
b2fd09625c macos: make OpenGL context opaque when possible
If our opaque region is the entire surface, then we can make the OpenGL
context opaque like we do for decorated windows. This improves performance
as the compositor does not need to blend the surface with the contents
behind the window.
2021-02-19 13:23:26 -08:00
Matthias Clasen
5797c72e9c Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master

See merge request GNOME/gtk!3224
2021-02-19 14:41:36 +00:00
Zander Brown
d02cfceb3d Update British English translation
(cherry picked from commit 1f18d2638f)
2021-02-19 14:26:26 +00:00
Zander Brown
451af280a2 Update British English translation
(cherry picked from commit 6f26331864)
2021-02-19 14:24:32 +00:00
Matthias Clasen
516776b630 gtk-demo: Make --version match about
Print the same version information in --version
that we show in the about dialog.
2021-02-18 22:52:15 -05:00
Matthias Clasen
4d0a1a97cc widget-factory: Make --version match about
Print the same version information in --version
that we show in the about dialog.
2021-02-18 22:51:35 -05:00
Matthias Clasen
3ee5354e0f imwayland: Be careful about cursor positions
We don't want to hand out cursor positions based on
the original preedit text and then tweak the text to
be different.
2021-02-18 15:33:01 -05:00
Matthias Clasen
07295ac169 Merge branch 'unintrusive-compose-preedit' into 'master'
Unintrusive compose preedit

See merge request GNOME/gtk!3220
2021-02-18 17:36:08 +00:00
Matthias Clasen
447e6db847 Merge branch 'wip/carlosg/font-setting-lookups' into 'master'
gdk/wayland: Look for font settings recursively

Closes #3680

See merge request GNOME/gtk!3218
2021-02-18 17:18:37 +00:00
Matthias Clasen
d84a028455 imwayland: Tweak preedit text
Tweak the preedit text we get from IBus (via the compositor) to
match what GtkIMContextSimple produces for Compose sequences now.

This provides a unified experience.
2021-02-18 11:44:09 -05:00
Matthias Clasen
4327a866f4 imcontext: Make Compose preedit less intrusive
Tweak the preedit display for Compose sequences to
be not so distracting. We only show the Compose key
when it occurs in the middle of the sequence or is
the only key so far, and use · instead of ⎄ for it.

Also, make sure to display dead keys more adequately.
2021-02-18 11:44:09 -05:00
Carlos Garnacho
1fbdfe340e gdk/wayland: Look for font settings recursively
Use the infrastructure already available to look up keys, instead.
This does the right thing and looks up the setting across all
sources.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3680
2021-02-18 16:50:45 +01:00
Matthias Clasen
4a47bdf596 Merge branch 'wip/exalm/root' into 'master'
widget: Don't assume GtkWindow root in gtk_widget_propagate_state()

See merge request GNOME/gtk!3217
2021-02-18 14:38:50 +00:00
Alexander Mikhaylenko
8e2f90e342 widget: Don't assume GtkWindow root in gtk_widget_propagate_state()
Avoid crashes with GtkDragIcon children.
2021-02-18 13:41:41 +05:00
Matthias Clasen
32c7ca50ea Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master

Closes #3679 and #3678

See merge request GNOME/gtk!3216
2021-02-18 05:52:44 +00:00
Matthias Clasen
19b9967a72 text: Fix sticky preedit attrs
In some cases, we were inadvertedly merging the
preedit attributes into priv->attrs, instead of
keeping them separate. This was causing the underlines
to grow beyond the preedit and never go away. One
place where this was showing up is the fontchooser
preview.

Fixes: #3679
2021-02-17 23:25:31 -05:00
Matthias Clasen
da71a37945 imwayland: Return limited preedit attributes
It should not matter, but it is the right thing to
do to limit the preedit attributes to the length
of the preedit text.
2021-02-17 22:57:41 -05:00
Matthias Clasen
05fe2441a7 imcontext: Enable font fallback for preedit
Not doing so only invites hexboxes.

Fixes: #3678
2021-02-17 22:11:57 -05:00
Matthias Clasen
35488959b4 paned: Add a paned handle class
Instead of bending GtkGizmo to the breaking point,
split off a GtkPanedHandle class that just does
what is needed here. Its simpler, and lets us keep
GtkGizmo simpler too. Everybody wins.
2021-02-17 21:45:33 -05:00
Matthias Clasen
af1981eda2 popovercontent: Few small fixes
Forgot to include config.h. Oops, and we make things
a bit shorter still.
2021-02-17 21:44:53 -05:00
Matthias Clasen
38da88908d Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master

Closes #3676 and #3675

See merge request GNOME/gtk!3215
2021-02-17 20:49:41 +00:00
Matthias Clasen
41abda9f03 Make gtk_im_modules_init properly private
Putting non-exported symbols in public headers can
only lead to confusion and day drinking. Don't do it.

Fixes: #3676
2021-02-17 15:25:42 -05:00
Matthias Clasen
5a8e2a8c2d gsk: Add a missing GDK_AVAILABLE_IN_ALL
gsk_text_node_has_color_glyphs was not properlty exported,
by accident.

Fixes: #3675
2021-02-17 15:20:24 -05:00
Matthias Clasen
7390e2490c Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master

See merge request GNOME/gtk!3214
2021-02-17 12:55:39 +00:00
Matthias Clasen
04daa236ad Revert "gizmo: Add a css_changed function"
This reverts commit 39f72b3834.
2021-02-16 23:51:14 -05:00
Matthias Clasen
31ceb4ddfb Revert "gizmo: Chain up in css_changed"
This reverts commit bb0a1b0cfe.
2021-02-16 23:51:14 -05:00
Matthias Clasen
c2f811dd29 popover: Add a popover content class
Instead of bending GtkGizmo to the breaking point,
split off a GtkPopoverContent class that just does
what is needed here. Its simpler, and lets us keep
GtkGizmo simpler too.
2021-02-16 23:51:14 -05:00
Matthias Clasen
189e0c05fd Merge branch 'wip/smcv/reftest-dedup' into 'master'
Reduce duplication in reftests

See merge request GNOME/gtk!3203
2021-02-17 03:55:45 +00:00
Matthias Clasen
8ee4ea4282 Merge branch 'wip/jimmac/tiled-resize-area-gtk4' into 'master'
Adwaita: control surface for resize tiled windows

Closes #3670

See merge request GNOME/gtk!3211
2021-02-17 03:54:27 +00:00
Jakub Steiner
edcd4c6207 Adwaita: control surface for resize tiled windows
- window resizing control area is implemented as where the shadows are drawn
- create a 'fake' shadow for the tiled case to allow easier resizing of
  the tiled window ratio even if it's offset to the side of the border

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3670
2021-02-16 14:10:14 +01:00