Timm Bäder [Tue, 21 Jan 2020 09:01:18 +0000 (10:01 +0100)]
testsuite: Add test cases for last commit
Easy enough to test
Timm Bäder [Tue, 21 Jan 2020 09:00:51 +0000 (10:00 +0100)]
gl renderer: Add builder offset correctly for non-affine modelviews
Timm Bäder [Tue, 21 Jan 2020 08:41:54 +0000 (09:41 +0100)]
GskTransform: Add gsk_transform_transform_point()
Equivalent of gsk_transform_transform_bounds() and
graphene_matrix_transform_point() respectively.
Timm Bäder [Mon, 20 Jan 2020 10:21:52 +0000 (11:21 +0100)]
gl renderer: Shorten shaders a bit
Timm Bäder [Mon, 20 Jan 2020 10:06:56 +0000 (11:06 +0100)]
cssimageicontheme: Avoid copying colors
Timm Bäder [Mon, 20 Jan 2020 09:20:26 +0000 (10:20 +0100)]
cssimagepaintable: Implement is_computed()
Timm Bäder [Mon, 20 Jan 2020 08:26:08 +0000 (09:26 +0100)]
cssimagescaled: Implement is_computed()
Timm Bäder [Mon, 20 Jan 2020 08:22:02 +0000 (09:22 +0100)]
cssimagerecolor: Implement is_computed()
Timm Bäder [Sun, 19 Jan 2020 19:08:23 +0000 (20:08 +0100)]
gl renderer: Move rect transformation to the vertex shader
No need to do this for every fragment.
Timm Bäder [Sun, 19 Jan 2020 16:11:57 +0000 (17:11 +0100)]
gl renderer: Transform rounded rect on the GPU
Change the RoundedRect struct we use in our shaders so we can transform
it using (affine) matrices.
Matthias Clasen [Thu, 23 Jan 2020 20:12:38 +0000 (15:12 -0500)]
text: Don't compute invisible char in init
This causes us to create a pango layout and
validate the css style, a high-overhead
operation. Just do it when the entry is set
to be invisible.
Matthias Clasen [Thu, 23 Jan 2020 18:27:56 +0000 (13:27 -0500)]
Fix Emoji completion
This was broken in various ways; Tabbing between pages
was causing segfaults, and using the hover state like
this does not work anymore, with hover now being completely
managed by GTK. Use focus instead, and also fix up the
style.
Matthias Clasen [Thu, 23 Jan 2020 16:26:52 +0000 (11:26 -0500)]
Replace .emoji with emoji for css
Matthias Clasen [Thu, 23 Jan 2020 16:17:52 +0000 (11:17 -0500)]
Adwaita: Drop .context-menu
We are not using it anymore, and yet fonts on a bold
textview are fine. So no need for this.
Matthias Clasen [Thu, 23 Jan 2020 16:15:51 +0000 (11:15 -0500)]
Adwaita: Just use .menu, instead of .appmenu
No need for this one-off class, there's no other menus
that could show up here.
Emmanuele Bassi [Thu, 23 Jan 2020 17:50:47 +0000 (17:50 +0000)]
Merge branch 'fix-avahi_service_resolver_cb-crash-master' into 'master'
printing: Fix crash in avahi_service_resolver_cb (master)
See merge request GNOME/gtk!1347
WGH [Thu, 23 Jan 2020 15:27:41 +0000 (18:27 +0300)]
printing: Fix crash in avahi_service_resolver_cb
printer_name_compressed_strv is NULL-terminated array
of gchar*, which means N+1 memory should be allocated.
Otherwise, if the printer name has no empty components
(which is usually the case), printer_name_compressed_strv[N],
which should contain the NULL sentinel, will actually lie
just outside of allocated memory, which is UB.
In my case, it led to crashes inside g_strjoinv
when Print... dialog is opened in evince.
#0 0x00007fad2ce1bad7 in __strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:96
#1 0x00007fad2d04d88d in g_strjoinv (separator=separator@entry=0x7fad0c9bc508 "-", str_array=str_array@entry=0x556b017f0200) at ../glib-2.60.7/glib/gstrfuncs.c:2585
#2 0x00007fad0c9b8a89 in avahi_service_resolver_cb (source_object=<optimized out>, res=<optimized out>, user_data=0x7fad08020ee0) at /var/tmp/portage/x11-libs/gtk+-3.24.13/work/gtk+-3.24.13/modules/printbackends/cups/gtkprintbackendcups.c:3223
#3 0x00007fad2d1f8ed3 in g_task_return_now (task=0x556b017a8b00 [GTask]) at ../glib-2.60.7/gio/gtask.c:1209
#4 0x00007fad2d1f987d in g_task_return (task=0x556b017a8b00 [GTask], type=<optimized out>) at ../glib-2.60.7/gio/gtask.c:1278
#5 0x00007fad2d1f9dec in g_task_return (type=G_TASK_RETURN_SUCCESS, task=<optimized out>) at ../glib-2.60.7/gio/gtask.c:1678
#6 0x00007fad2d1f9dec in g_task_return_pointer (task=<optimized out>, result=<optimized out>, result_destroy=<optimized out>) at ../glib-2.60.7/gio/gtask.c:1683
#7 0x00007fad2d24b6af in g_dbus_connection_call_done (source=<optimized out>, result=0x556b017a8bc0, user_data=0x556b017a8b00) at ../glib-2.60.7/gio/gdbusconnection.c:5747
#8 0x00007fad2d1f8ed3 in g_task_return_now (task=0x556b017a8bc0 [GTask]) at ../glib-2.60.7/gio/gtask.c:1209
#9 0x00007fad2d1f8f09 in complete_in_idle_cb (task=0x556b017a8bc0) at ../glib-2.60.7/gio/gtask.c:1223
#10 0x00007fad2d02d2c0 in g_main_dispatch (context=0x556b00eee090) at ../glib-2.60.7/glib/gmain.c:3189
#11 0x00007fad2d02d2c0 in g_main_context_dispatch (context=context@entry=0x556b00eee090) at ../glib-2.60.7/glib/gmain.c:3854
#12 0x00007fad2d02d658 in g_main_context_iterate (context=context@entry=0x556b00eee090, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib-2.60.7/glib/gmain.c:3927
#13 0x00007fad2d02d6df in g_main_context_iteration (context=context@entry=0x556b00eee090, may_block=may_block@entry=1) at ../glib-2.60.7/glib/gmain.c:3988
#14 0x00007fad2d22248d in g_application_run (application=0x556b0116f130 [EvApplication], argc=<optimized out>, argv=<optimized out>) at ../glib-2.60.7/gio/gapplication.c:2519
#15 0x0000556b002e55a1 in ()
#16 0x00007fad2ccd6f1b in __libc_start_main (main=0x556b002e50d0, argc=2, argv=0x7ffe1057fa88, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffe1057fa78) at ../csu/libc-start.c:308
#17 0x0000556b002e567a in ()
(gdb) p printer_name_compressed_strv[0]
$4 = (gchar *) 0x556d4a4be430 "Brother"
(gdb) p printer_name_compressed_strv[1]
$5 = (gchar *) 0x7f9dbc011090 "MFC"
(gdb) p printer_name_compressed_strv[2]
$6 = (gchar *) 0x556d4a51ba50 "7860DW"
(gdb) p printer_name_compressed_strv[3]
$7 = (gchar *) 0x401 <error: Cannot access memory at address 0x401>
Matthias Clasen [Thu, 23 Jan 2020 15:29:22 +0000 (10:29 -0500)]
Add profiler marks around css selector tree building
This is a big part of theme loading, and worth
showing in traces.
Matthias Clasen [Thu, 23 Jan 2020 05:14:49 +0000 (00:14 -0500)]
Adwaita: Remove .entry-tag class
Not used in GTK.
Matthias Clasen [Thu, 23 Jan 2020 05:11:10 +0000 (00:11 -0500)]
Adwaita: Remove .rubberband class
All GTK widget are using a rubberband element now.
Matthias Clasen [Thu, 23 Jan 2020 05:08:53 +0000 (00:08 -0500)]
Adwaita: Remove .location-bar class
Not used in GTK.
Matthias Clasen [Thu, 23 Jan 2020 05:04:09 +0000 (00:04 -0500)]
Adwaita: Remove gtkstyle-fallback
Matthias Clasen [Thu, 23 Jan 2020 04:57:30 +0000 (23:57 -0500)]
Adwaita: Remove the .drag-icon class
This class was not used in GTK.
Matthias Clasen [Thu, 23 Jan 2020 04:53:55 +0000 (23:53 -0500)]
pathbar: Use a css name insead of a style class
Use pathbar for GtkPathBar in css, instead of the
previous .path-bar. Update Adwaita to match.
Matthias Clasen [Thu, 23 Jan 2020 03:20:17 +0000 (22:20 -0500)]
Ensure icon themes are loaded with other themes
Trigger icon theme loading from the code in GtkApplication
where we set up the icon theme search path. This makes
it happen before the first frame.
Matthias Clasen [Thu, 23 Jan 2020 02:31:08 +0000 (21:31 -0500)]
icontheme: Add profiler marks around icon theme loading
This is happening during the first frame.
Matthias Clasen [Thu, 23 Jan 2020 02:30:22 +0000 (21:30 -0500)]
iconhelper: Add profiler marks around icon loading
These mainly happen during the first frame, causing
it to be longer than 'normal' frames.
Matthias Clasen [Thu, 23 Jan 2020 02:29:47 +0000 (21:29 -0500)]
css: Add a profiler mark around theme loading
This is also time spent before the first frame.
Matthias Clasen [Thu, 23 Jan 2020 02:28:51 +0000 (21:28 -0500)]
application: Add some profiler marks
Add marks around gtk_init and application startup
helps to understand where the time before the first
frame goes.
Matthias Clasen [Thu, 23 Jan 2020 02:27:59 +0000 (21:27 -0500)]
gdk: Add a profiler mark for paint_idle
This is the big frame clock function where most
signals are emitted, and it can keep us away from
the mainloop for a long time.
Matthias Clasen [Thu, 23 Jan 2020 00:31:21 +0000 (19:31 -0500)]
wayland: Add a mark for cursor loading
This is much too slow.
Matthias Clasen [Thu, 23 Jan 2020 00:04:53 +0000 (19:04 -0500)]
More profiler reshuffling
Add more of the marks without requiring a debug build.
Matthias Clasen [Wed, 22 Jan 2020 21:38:17 +0000 (16:38 -0500)]
gtk: Clearer names for profiler marks
Naming matters. Don't be overly generic here.
Matthias Clasen [Wed, 22 Jan 2020 21:37:48 +0000 (16:37 -0500)]
gl: Disambiguate profiler marks
"render" was used for both GL and widgets. Oops.
Matthias Clasen [Wed, 22 Jan 2020 21:36:54 +0000 (16:36 -0500)]
surface: Always dd events to the profiler trace
We want to get this data for release builds as well.
Matthias Clasen [Wed, 22 Jan 2020 21:36:02 +0000 (16:36 -0500)]
frame clock: Redo the profiler marks
Instead of reporting the frame clock phases as defined,
report the duration of the signal emissions, which is more
useful for tracking down what is taking time.
Matthias Clasen [Wed, 22 Jan 2020 20:55:31 +0000 (15:55 -0500)]
ci: Save syscap files from performance tests
They might become useful at some point.
Matthias Clasen [Wed, 22 Jan 2020 20:10:35 +0000 (15:10 -0500)]
window: Rename a profiler mark
The "layout" name was already taken for the frame clock
phase by that name. Oops.
Matthias Clasen [Wed, 22 Jan 2020 19:51:40 +0000 (14:51 -0500)]
wayland: Add profiler marks around surface handling
Add marks for when we do commits, swap buffer or
receive frame events. These are the low-level start
and end points of the frame cycle, and it is useful
to see them in the profiler.
Matthias Clasen [Wed, 22 Jan 2020 19:50:54 +0000 (14:50 -0500)]
surface: Add enter/leave events to profiler traces
These are just as likely to trigger extra work than
other mouse events, so it is useful to show them.
Matthias Clasen [Wed, 22 Jan 2020 19:49:17 +0000 (14:49 -0500)]
icontheme: Add profiler marks for loading icons
This helps to clearly identify the places where we
do IO, in profiler traces.
sicklylife [Wed, 22 Jan 2020 17:32:21 +0000 (17:32 +0000)]
Update Japanese translation
sicklylife [Wed, 22 Jan 2020 17:29:36 +0000 (17:29 +0000)]
Update Japanese translation
Matthias Clasen [Wed, 22 Jan 2020 12:54:48 +0000 (12:54 +0000)]
Merge branch 'wip/jimmac/typography-classes' into 'master'
Adwaita: general typography classes
Closes #1808
See merge request GNOME/gtk!1339
Jakub Steiner [Wed, 22 Jan 2020 11:02:51 +0000 (12:02 +0100)]
Adwaita: general typography classes
- many moons and some iterations later, these are the suggested
general typographic styles. Already being referenced in apps like
Banner Viewer (for now shipping custom definitions)
Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1808
Matthias Clasen [Wed, 22 Jan 2020 05:58:13 +0000 (00:58 -0500)]
testsuite: Move the meson performance tests up
Since the binary is moved, there is no need for
the subdirectory here anymore.
Matthias Clasen [Wed, 22 Jan 2020 05:55:11 +0000 (00:55 -0500)]
Make the performance testcase more general
Reuse the performance test for layout and snapshot timings.
Matthias Clasen [Wed, 22 Jan 2020 05:29:43 +0000 (00:29 -0500)]
css: Make performance test more flexible
Allow to specify the name of the mark that we're looking
for the first instance of.
Matthias Clasen [Wed, 22 Jan 2020 04:43:37 +0000 (23:43 -0500)]
widget: Add profiler marks
This gives high-level entries for the duration of
snapshotting and layout in the frame cycle.
Matthias Clasen [Wed, 22 Jan 2020 04:43:01 +0000 (23:43 -0500)]
window: Add a profiler mark around size allocation
This give a high-level entry for the duration of size allocation
in the frame cycle.
Matthias Clasen [Wed, 22 Jan 2020 04:19:24 +0000 (23:19 -0500)]
container: Remove an unnecessary check
GtkWindow implements GtkRoot, so we can avoid
treating them separately.
Matthias Clasen [Wed, 22 Jan 2020 03:38:50 +0000 (03:38 +0000)]
Merge branch 'matthiasc/perf-tests' into 'master'
Performance tests
See merge request GNOME/gtk!1338
Matthias Clasen [Wed, 22 Jan 2020 00:55:08 +0000 (19:55 -0500)]
testsuite: Make performance test fail
If a child process exits unsuccessfully,
make the performance test fail.
Matthias Clasen [Wed, 22 Jan 2020 00:51:14 +0000 (19:51 -0500)]
testsuite: Point performance tests at uninstalled schemas
widget-factory won't run otherwise.
Matthias Clasen [Wed, 22 Jan 2020 00:30:59 +0000 (19:30 -0500)]
Use the v9 image for ci runs
The v9 image add sysprof-devel, so we can build
and run performance tests using libsysprof.
Matthias Clasen [Tue, 21 Jan 2020 23:20:05 +0000 (18:20 -0500)]
ci: Build with profiler support
This will let us run sysprof-based performance tests.
Matthias Clasen [Tue, 21 Jan 2020 23:17:50 +0000 (18:17 -0500)]
ci: Add sysprof-devel to the image
We need it to build with profiler support.
Matthias Clasen [Tue, 21 Jan 2020 23:09:43 +0000 (18:09 -0500)]
Fix testsuite without -Dprofiler=true
Only build and run the performance tests if we have sysprof.
Matthias Clasen [Tue, 21 Jan 2020 22:49:40 +0000 (17:49 -0500)]
Run the css performance test in the testsuite
The numbers just end up in the testlog for now.
Matthias Clasen [Tue, 21 Jan 2020 18:59:12 +0000 (13:59 -0500)]
Prototype a sysprof helper
This is an attempt to see how we can use sysprof data
in our tests to extract useful performance numbers.
Use it as a wrapper around any GTK+ process:
./testperf ./gtk4-widget-factory
Currently, it repeatedly runs the given commandline,
extracts the first css validation time from the resulting
syscap file, and prints out the min/max/avg of the runs
at the end.
This relies on the environment variable GTK_DEBUG_AUTO_QUIT
to cause the process to exit soon after launch.
Matthias Clasen [Tue, 21 Jan 2020 21:57:20 +0000 (16:57 -0500)]
widget-factory: Add a way to quit automatically
This can be used to measure startup cost in tests.
Matthias Clasen [Tue, 21 Jan 2020 16:50:12 +0000 (11:50 -0500)]
gdk: Make profiler support unconditional
We are still not providing samples unless debugging is enabled.
That needs a bit more work.
Matthias Clasen [Tue, 21 Jan 2020 16:38:34 +0000 (11:38 -0500)]
cssnode: Make the profiler support unconditional
Matthias Clasen [Tue, 21 Jan 2020 16:17:17 +0000 (16:17 +0000)]
Merge branch 'otte/for-master' into 'master'
selector: Add GtkSelectorCategory
See merge request GNOME/gtk!1337
Benjamin Otte [Tue, 21 Jan 2020 15:51:55 +0000 (16:51 +0100)]
selector: Add GtkSelectorCategory
This will make it easier to write more complex matching algorithms.
Benjamin Otte [Tue, 21 Jan 2020 14:13:02 +0000 (14:13 +0000)]
Merge branch 'otte/for-master' into 'master'
Otte/for master
See merge request GNOME/gtk!1336
Benjamin Otte [Tue, 21 Jan 2020 13:43:31 +0000 (14:43 +0100)]
stylecontext: Remove excess gtk_css_node_invalidate() call
This call is not necessary, because gtk_css_node_set_parent() does the
right thing. (It probably hasn't been necessary for years, but I'm
not gonna try my luck on GTK3 at this stage.)
This code is usually called the first time
gtk_widget_get_style_context() is called on a widget and its style
context gets create. At that point however, the css nodes are in the
right place already, so no invalidation should happen.
Benjamin Otte [Tue, 21 Jan 2020 12:09:26 +0000 (12:09 +0000)]
Merge branch 'otte/for-master' into 'master'
Otte/for master
See merge request GNOME/gtk!1333
Benjamin Otte [Tue, 21 Jan 2020 11:48:20 +0000 (12:48 +0100)]
win32: Don't save/restore the context for querying the font
Use the font in the current state.
Benjamin Otte [Tue, 21 Jan 2020 02:05:38 +0000 (03:05 +0100)]
widget: Remove gtk_widget_get_path()
Benjamin Otte [Tue, 21 Jan 2020 02:03:46 +0000 (03:03 +0100)]
cssnode: Remove unused widget path vfuncs
Benjamin Otte [Tue, 21 Jan 2020 01:59:26 +0000 (02:59 +0100)]
containter: Remove gtk_container_get_path_for_child()
Benjamin Otte [Tue, 21 Jan 2020 01:54:55 +0000 (02:54 +0100)]
stylecontext: Change semantics of gtk_style_context_get_path()
Widget contexts now return NULL here. A non-NULL result requires a
previous call to gtk_style_context_set_path()
Benjamin Otte [Tue, 21 Jan 2020 01:50:07 +0000 (02:50 +0100)]
widget: Initialize cssnode name asap
That way, it's correct in subclass's init functions.
Matthias Clasen [Tue, 21 Jan 2020 04:52:12 +0000 (04:52 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Add some static assertions
See merge request GNOME/gtk!1334
Matthias Clasen [Tue, 21 Jan 2020 03:53:25 +0000 (22:53 -0500)]
Add some static assertions
Add assertions that ensure the relationships between
css property IDs that we rely on are preserved.
Matthias Clasen [Tue, 21 Jan 2020 01:08:41 +0000 (20:08 -0500)]
Add profiler support for css validation
Push numbers about css validation and style creation
to sysprof.
Benjamin Otte [Tue, 8 Oct 2019 19:16:25 +0000 (21:16 +0200)]
textview: Make cursor work when blinking is disabled
Matthias Clasen [Sun, 19 Jan 2020 20:48:17 +0000 (15:48 -0500)]
cssselector: Inline a few things
Matthias Clasen [Sun, 19 Jan 2020 06:09:11 +0000 (01:09 -0500)]
style cascade: Remove some pointless casts
The casts and checks in gtkstylecascade.c are leftovers
from when we had GtkStyleProviderPrivate, and no longer
serve any purpose.
Matthias Clasen [Sun, 19 Jan 2020 06:12:19 +0000 (01:12 -0500)]
pick: Take advantage of transform categories
Transform categories let us easily avoid doing matrix math
when we can just do a simple translation.
Matthias Clasen [Sun, 19 Jan 2020 05:41:45 +0000 (00:41 -0500)]
Refactor gtk_widget_pick
Split this into a recursive part and a public
entry point. This lets us avoid some duplicate
checks.
Piotr Drąg [Sun, 19 Jan 2020 12:04:34 +0000 (13:04 +0100)]
Update Polish translation
Matthias Clasen [Sat, 18 Jan 2020 23:19:23 +0000 (18:19 -0500)]
css: Redo the pseudoclass selectors
There is no need to duplicate the classes, we can make
do with a single class for all the states.
Matthias Clasen [Sat, 18 Jan 2020 22:55:58 +0000 (17:55 -0500)]
css: Go back to clearing out selectors
Now that we use the selector tree for change computation
again, we don't need the ruleset selectors anymore.
Bring back the code that cleans them out.
Goran Vidović [Sun, 19 Jan 2020 00:33:57 +0000 (00:33 +0000)]
Update Croatian translation
Goran Vidović [Sun, 19 Jan 2020 00:13:42 +0000 (00:13 +0000)]
Update Croatian translation
Matthias Clasen [Sat, 18 Jan 2020 19:18:47 +0000 (14:18 -0500)]
Refine the selector tree printing
Also show which tree nodes have exact matches.
Matthias Clasen [Sat, 18 Jan 2020 19:16:36 +0000 (14:16 -0500)]
Fix a css change testcase
The ui file here was invalid, leading to nonsensical
results.
Matthias Clasen [Sat, 18 Jan 2020 17:10:26 +0000 (12:10 -0500)]
Actually turn of css value accounting
We need an #undef here. While doing so, make sure
it compiles without warnings when disabled.
Matthias Clasen [Sat, 18 Jan 2020 15:51:54 +0000 (10:51 -0500)]
inspector: Avoid an array overrun
Commit
3f56af373891bf6e3 added a new value to the
GdkInputSource enum, forgetting that the inspector
has an array of names to match this enum.
Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/2385
Matthias Clasen [Sat, 18 Jan 2020 07:34:56 +0000 (02:34 -0500)]
wayland: Fix release build warnings
Matthias Clasen [Sat, 18 Jan 2020 07:34:25 +0000 (02:34 -0500)]
x11: Fix release build warnings
Piotr Drąg [Sat, 18 Jan 2020 16:39:53 +0000 (17:39 +0100)]
Update POTFILES.skip
Timm Bäder [Fri, 17 Jan 2020 15:37:29 +0000 (16:37 +0100)]
gl renderer: Pull a local variable in the closest scope
Timm Bäder [Thu, 16 Jan 2020 12:41:55 +0000 (13:41 +0100)]
cssimagefallback: Don't snapshot invisible colors
This avoids a few render nodes later.
Timm Bäder [Thu, 16 Jan 2020 12:17:35 +0000 (13:17 +0100)]
widget: Get opacity without GtkStyleContext
GtkStyleContext is really just unnecessary here.
Timm Bäder [Thu, 16 Jan 2020 10:33:12 +0000 (11:33 +0100)]
cssstyle: set font variations in get_pango_font()
Doesn't make sense to set all the css values on the font description in
there except for the font variations, so do these here as well.
Timm Bäder [Thu, 16 Jan 2020 10:30:14 +0000 (11:30 +0100)]
widget: Get DPI from style directly
Instead of going through GtkStyleContext.
Timm Bäder [Thu, 16 Jan 2020 10:27:37 +0000 (11:27 +0100)]
cssstyle: Implement get_pango_font() directly
Instead of going through the slow GValue code path. This function was
unused, so use it in GtkWidget's update_pango_context() now.