Commit Graph

58918 Commits

Author SHA1 Message Date
Matthias Clasen
b576aef2b1 Revert "gl: Simplify glyph cache rendering"
This reverts commit 7a3eaad193.

The reason we want to keep using pango here
is that we get hex boxes and similar drawing
features that way.
2019-08-01 00:18:19 -04:00
Matthias Clasen
5d10100fc0 Merge branch 'glyph-cache-fixes' into 'master'
gl: Glyph cache fixes

See merge request GNOME/gtk!1034
2019-07-31 12:26:16 +00:00
Matthias Clasen
6118dfba74 Add missing includes 2019-07-31 08:04:03 -04:00
Matthias Clasen
d276d2629a gl: Glyph cache fixes
Pass the full location to the glyph cache lookup,
and use the same rounding as cairo does. This makes
the output much closer to the cairo renderer.
2019-07-31 00:03:13 -04:00
Matthias Clasen
e3ee1df456 Add an image comparison utility
This comes in handy sometimes, and we
already have the image diff code.
2019-07-30 14:02:43 -04:00
Daniel Mustieles
2691e4e949 Updated Spanish translation 2019-07-30 09:39:55 +02:00
Timm Bäder
20d7b7f59b widget factory: add a tooltip to a button in a popover 2019-07-30 07:05:45 +02:00
Matthias Clasen
1fcd08d76a Merge branch 'issue2057' into 'master'
Bump wayland-protocols requirements

See merge request GNOME/gtk!1030
2019-07-29 12:17:52 +00:00
Olivier Fourdan
060a9f072c Bump wayland-protocols requirements
The `name` and `description` events were added to `xdg-output` protocol
in version 2 which is part of wayland-protocols 1.14.

In xdg-output-v1 version 3, the `xdg-output.done` event was deprecated
and the `xdg-output.description` event was made mutable, but that
doesn't change the actual events so we do not actually need to require
that version of xdg-output from wayland-protocols 1.18.

Update the wayland-protocols requirement to the bare minimum version,
which is 1.14.

https://gitlab.gnome.org/GNOME/gtk/issues/2057
2019-07-29 12:03:07 +02:00
Matthias Clasen
4a631787bd Merge branch 'subpixel-positioning' into 'master'
Subpixel positioning

See merge request GNOME/gtk!1024
2019-07-28 21:02:31 +00:00
Matthias Clasen
032473fef8 reftest: Exclude flaky tests
These depend on details of text rendering,
and started failing with newer pango.
2019-07-28 16:42:52 -04:00
Matthias Clasen
5dd8801ee5 gl: implement subpixel positioning
Pass the glyph position into the glyph caching functions,
not just the glyph index. This allows us to cache different
images for different subpixel positions.
2019-07-28 16:42:52 -04:00
Matthias Clasen
5c9643b6eb vulkan: implement subpixel positioning
Pass the glyph position into the glyph caching functions,
not just the glyph index. This allows us to cache different
images for different subpixel positions.
2019-07-28 16:42:52 -04:00
Matthias Clasen
4de670b0b4 Turn off metrics hinting
This will be necessary to see the effects of subpixel positioning.
2019-07-28 16:42:52 -04:00
Matthias Clasen
ade40a7a0c Merge branch 'wip/chergert/textview-caching' into 'master'
textlayout: introduce caching for GtkTextLineDisplay

See merge request GNOME/gtk!1025
2019-07-28 20:32:56 +00:00
Christian Hergert
9926e6ebde textlayout: introduce caching for GtkTextLineDisplay
This adds a GtkTextLineDisplayCache which can be used to cache a number
of GtkTextLineDisplay (and thus, PangoLayout) while displaying a view.

It uses a GSequence to track the position of the GtkTextLineDisplay
relative to each other, a MRU to cull the least recently used display,
and and a direct hashtable to lookup display by GtkTextLine.

We only cache lines that are to be displayed (!size_only). We may want to
either create a second collection of "size_only" lines to speed that up,
or determine that it is unnecessary (which is likely the case).
2019-07-28 10:34:15 -07:00
Christian Hergert
b930c5a8a2 textiter: add _gtk_text_iter_same_line()
This is a faster form to compare two text iter to see if they are on the
same line.
2019-07-28 10:34:15 -07:00
Matthias Clasen
7eb5dfd294 inspector: Show the pango backend 2019-07-28 11:39:16 -04:00
Matthias Clasen
8752564fea Remove new attributes from tests
Until we can depend on pango 1.44, these will
fail in ci. Partially reverts f1c7803f80
2019-07-28 11:00:29 -04:00
Matthias Clasen
988fac404a Add pango version checks
Seems the ci does not have pango 1.44 yet.
2019-07-28 10:50:14 -04:00
Matthias Clasen
7a3eaad193 gl: Simplify glyph cache rendering
We are currently using a weird mix of pango and cairo,
but there is no need for us to go through a pango
renderer here; we can just use cairo directly.
2019-07-28 09:54:17 -04:00
Matthias Clasen
3fccb16ca6 gsk: Move text-related test out of ci
These are too sensitive to rendering differences
between renderers to run reliably in ci, but we
still want to keep them around. In particular,
the big glyph tests are useful to exercise the
GL glyph cache.
2019-07-28 09:35:37 -04:00
Timm Bäder
2c38b71ca5 glyph cache: Upload large glyphs in lookup () directly
Instead of relying on a texture id of 0, which can happen for other
reasons, e.g. when the glyph is being scaled too small.

Fixes part of #2046
2019-07-28 12:00:15 +02:00
Timm Bäder
1c93bef0d5 glyph cache: check glyphs for scaled size
We can't rely on just the ink_rect, since that might be without the
scaled applied, which is what ends up on the texture.

Fixes #2046
2019-07-28 10:58:10 +02:00
Timm Bäder
eea76e8cce textview: Remove some unnecessary gtk_widget_show() calls
Widgets are visible by default.
2019-07-28 08:44:45 +02:00
Jordi Mas
3b604331ec Update Catalan translation 2019-07-28 01:05:25 +02:00
Matthias Clasen
92546cf9f7 Merge branch 'overview-recursive-dependancy' into 'master'
overview.xml: The GTK library does not depend on the GTK library

See merge request GNOME/gtk!1026
2019-07-27 21:46:52 +00:00
Piotr Drąg
3c9f9d598b Update Polish translation 2019-07-27 15:20:40 +02:00
Piotr Drąg
ed46053dc9 Update POTFILES.skip 2019-07-27 15:03:47 +02:00
Дилян Палаузов
a3db7437b3 overview.xml: The GTK library does not depend on the GTK library
The documentation stated:

GTK is a library.…  GTK depends on the following libraries:

GTK       The GTK library itself contains widgets, that is, GUI
          components such as GtkButton or GtkTextView.

There is no point in stating, that the GTK library
depends on the GTK library.
2019-07-27 11:59:45 +00:00
Timm Bäder
b2d639b6d9 window: Unroot with old display
Things might rely on the old display being set while unrooting.

Fixes #2052
2019-07-27 07:57:06 +02:00
Matthias Clasen
f1c7803f80 label: Parse new pango attributes
Support allow-breaks and show attributes.
These will be in pango 1.44
2019-07-27 00:02:08 -04:00
Matthias Clasen
c179fce6c7 Merge branch 'xdg-output-v3-gtk4' into 'master'
wayland: Add xdg-output v3 support

See merge request GNOME/gtk!1022
2019-07-26 17:13:39 +00:00
Olivier Fourdan
795899f9d5 wayland: Add xdg-output v3 support
xdg-output v3 marks xdg-output.done as deprecated and compositors are
not required to send that event anymore.

So if the xdg-output version is 3 or higher, simply set the initial
value `xdg_output_done` to TRUE so we don't wait/expect that event
from the compositor.

https://gitlab.gnome.org/GNOME/gtk/issues/2053
2019-07-26 17:32:17 +02:00
Matthias Clasen
88ab3a6942 Merge branch 'wip/no-move-surface' into 'master'
Remove surface moving APIs

See merge request GNOME/gtk!1016
2019-07-26 14:31:49 +00:00
Timm Bäder
58e8dd1c0d gl renderer: Fix dx/dy handling on hidpi
Fixes misplaced error squiggles in the node editor.
2019-07-26 16:27:39 +02:00
Timm Bäder
b8bbf7b63b gl renderer: Rework transform handling
Fix all the ref counting mishaps. Makes hidpi work again and without
memory leaks.
2019-07-26 15:35:06 +02:00
Kukuh Syafaat
05e28fb498 Update Indonesian translation 2019-07-26 11:31:46 +00:00
Kjartan Maraas
c6d9963d1a Update Norwegian Bokmål translation 2019-07-26 09:01:15 +00:00
Daniel Mustieles
2d3a902beb Updated Spanish translation 2019-07-26 09:18:25 +02:00
Matthias Clasen
8b1f3936b6 font rendering demo: Make boxes optional 2019-07-26 00:31:07 -04:00
Matthias Clasen
108ea50179 font rendering demo: Show unrounded extents
This makes more sense.
2019-07-25 23:35:09 -04:00
Matthias Clasen
df1892c052 font rendering: Show ink rect too 2019-07-25 22:06:34 -04:00
Matthias Clasen
0820a79bf5 Improve the font rendering demo
Show the pixel grid, extents, and baseline.
2019-07-25 19:07:12 -04:00
Matthias Clasen
4427bde8a7 Merge branch 'fontrendering-demo' into 'master'
Add a font rendering demo

See merge request GNOME/gtk!1019
2019-07-25 21:06:54 +00:00
Matthias Clasen
dec4db5943 Add a font rendering demo
This renders a magnified version of the text,
to make the effect of various font rendering options
more visible.

It also shows the phases of subpixel rendering,
if you have a recent pango and cairo.
2019-07-25 16:43:22 -04:00
Matthias Clasen
fd7f6ca7ad tests: improve error handling 2019-07-25 13:51:34 -04:00
Matthias Clasen
dea309144b gtk-demo: Fix a crash 2019-07-25 13:51:34 -04:00
Emmanuele Bassi
f1e4efebb7 Merge branch 'gtk-4-add-TCRYPT-options-to-ask-password-dialog' into 'master'
gtkmountoperation: Add TCRYPT options to the ask-password dialog

See merge request GNOME/gtk!263
2019-07-25 10:16:11 +00:00
Jonas Ådahl
0885eb0a7b gdk: Remove gdk_surface_move_resize() API
Windows/surface's aren't supposed to be explicitly moved by any external
part, so don't provide API for doing so. Usage throughout Gdk is
replaced by the corresponding backend variants.
2019-07-25 10:35:43 +02:00