Timm Bäder [Sat, 25 Jan 2020 14:40:53 +0000 (15:40 +0100)]
Remove gtkutils{.c,private.h}
All but one functions are unused. Move the remaining one into
gtkmodules.c, its only caller.
Timm Bäder [Sat, 25 Jan 2020 07:40:40 +0000 (08:40 +0100)]
cssparser: make a few local variables const
Timm Bäder [Sat, 25 Jan 2020 07:33:51 +0000 (08:33 +0100)]
cssprovider: Parse selectors without a GList
The maximum length of this list in Adwaita is 18, so use a generous
maximum length of 64 for the selector list of a ruleset.
Timm Bäder [Fri, 24 Jan 2020 15:02:34 +0000 (16:02 +0100)]
GtkCssImageUrl: Implement is_computed()
Timm Bäder [Fri, 24 Jan 2020 10:29:43 +0000 (11:29 +0100)]
gl renderer: Avoid some work when rendering border nodes
Timm Bäder [Fri, 24 Jan 2020 10:21:38 +0000 (11:21 +0100)]
cssimage: Add gtk_css_image_to_string()
In line with all the other _to_string() implementations
Timm Bäder [Fri, 24 Jan 2020 06:55:17 +0000 (07:55 +0100)]
window: Replace GtkStyleContext use to get surface transform
We have GtkCssBoxes for this these days.
Matthias Clasen [Sun, 26 Jan 2020 04:49:33 +0000 (23:49 -0500)]
Revert "lookup stats"
This reverts commit
3d9e3390f167a220e8775d08356259f420e045ce.
Matthias Clasen [Sun, 26 Jan 2020 04:49:17 +0000 (23:49 -0500)]
Revert "css: Split style into groups"
This reverts commit
0df0de0b5db87248ad1371ee1bfc8a733ec079e4.
Matthias Clasen [Sun, 26 Jan 2020 04:16:06 +0000 (23:16 -0500)]
css: Split style into groups
Matthias Clasen [Sat, 25 Jan 2020 23:38:42 +0000 (18:38 -0500)]
Adwaita: take out an unnecessary rule
The comment says setting caret-color to currentColor
shouldn't be necessary, and it is right.
Matthias Clasen [Sat, 25 Jan 2020 23:20:40 +0000 (18:20 -0500)]
Adwaita: drop the *
Matthias Clasen [Sat, 25 Jan 2020 23:20:26 +0000 (18:20 -0500)]
lookup stats
Matthias Clasen [Sat, 25 Jan 2020 20:05:14 +0000 (15:05 -0500)]
Fix a scrollbar sizing issue
The recent Adwaita changes inadvertendly made scrollbars
resize on hover. Fix that, by reinstating some lost rules.
Matthias Clasen [Sat, 25 Jan 2020 19:30:25 +0000 (14:30 -0500)]
Revert "Ensure icon themes are loaded with other themes"
This reverts commit
88d26b75491c9a329a836c0d91a8f85ee3bc77d1.
This change caused GtkShortcutWindow to not work anymore,
and we are fixing icon themes differently, anyway.
Matthias Clasen [Sat, 25 Jan 2020 19:29:20 +0000 (19:29 +0000)]
Merge branch 'style-context-redux' into 'master'
Stop using GtkStyleContext internally
See merge request GNOME/gtk!1353
Matthias Clasen [Sat, 18 Jan 2020 16:48:30 +0000 (11:48 -0500)]
popover: Stop using style context getters
Matthias Clasen [Sat, 18 Jan 2020 14:57:13 +0000 (09:57 -0500)]
drag icon: Stop using style context getters
Just go to the css node directly.
Matthias Clasen [Sat, 18 Jan 2020 14:50:04 +0000 (09:50 -0500)]
gskpango: Stop using style context getters
Just go to the css nodes directly.
Matthias Clasen [Sat, 18 Jan 2020 08:12:01 +0000 (03:12 -0500)]
widget: Stop using style context internally
Matthias Clasen [Sat, 25 Jan 2020 06:28:24 +0000 (01:28 -0500)]
Add a profiler mark around renderer realization
This takes time that is worth calling out.
Matthias Clasen [Sat, 25 Jan 2020 02:01:42 +0000 (21:01 -0500)]
Adwaita: Fix some entry styling
This was accidentally broken when parent selectors
were introduced here.
Matthias Clasen [Sat, 25 Jan 2020 01:54:50 +0000 (20:54 -0500)]
GtkSpinner: Pay attention to style changes
Make GtkIcon redraw and resize when style changes
require it.
Matthias Clasen [Sat, 25 Jan 2020 01:54:01 +0000 (20:54 -0500)]
GtkPaned: Pay attention to style changes
Make GtkPaned redraw and resize when style change
require it.
Matthias Clasen [Sat, 25 Jan 2020 01:53:16 +0000 (20:53 -0500)]
GtkIcon: Pay attention to style changes
Make GtkIcon redraw and resize when style changes
require it.
Matthias Clasen [Sat, 25 Jan 2020 00:57:45 +0000 (19:57 -0500)]
css: Update affects flags for icons
We want to differentiate what requires recreating the
texture and what doesn't. In particular, the current
flags are not handling symbolic icons right.
Matthias Clasen [Fri, 24 Jan 2020 23:03:56 +0000 (23:03 +0000)]
Merge branch 'wayland-cursors' into 'master'
Make wayland load cursors on demand
See merge request GNOME/gtk!1350
Matthias Clasen [Fri, 24 Jan 2020 18:33:13 +0000 (13:33 -0500)]
Make wayland load cursors on demand
Copy just enough of libwayland-cursor to make our own
loading. This lets us drop the dependency on libwayland-cursor,
and changes the startup cost for cursor theme loading
from 25ms to 0.1ms.
At the same time, simplify the handling of scaled cursors -
instead of creating an array of theme objects, just make a
single theme object provide all scaled cursor sizes.
Matthias Clasen [Fri, 24 Jan 2020 16:51:18 +0000 (11:51 -0500)]
Revert "css: Print selectors"
This reverts commit
da5d5243241941ba130fc0644e66986f967a2ef3.
And this one too. The commits are there, if people need this
kind of statistics again, they can just be cherry-picked.
Matthias Clasen [Fri, 24 Jan 2020 16:50:40 +0000 (11:50 -0500)]
Revert "css: Print out relative costs of selectors"
This reverts commit
5dcce0c0bdccf5b55a15ff45247b2fc06bf77f7f.
I forgot to ifdef a few things in here, so lets take this out
again.
Matthias Clasen [Fri, 24 Jan 2020 16:20:42 +0000 (16:20 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!1348
Matthias Clasen [Fri, 24 Jan 2020 05:12:05 +0000 (00:12 -0500)]
Adwaita: Drop selection mode
This is not really a feature that GTK has; and it lets
us drop a significant amount of css.
Matthias Clasen [Fri, 24 Jan 2020 05:08:46 +0000 (00:08 -0500)]
Adwaita: Drop menu remnants
Menus are gone.
Matthias Clasen [Fri, 24 Jan 2020 04:12:29 +0000 (23:12 -0500)]
css: Print out relative costs of selectors
Count how often each tree node is visited, and print the number
at the end. This gives a good indication what selectors are costly
and should be avoided. #ifdefed out.
Matthias Clasen [Fri, 24 Jan 2020 02:04:15 +0000 (21:04 -0500)]
Adwaita: Remove a wildcard rule for tooltips
These rules are expensive, and don't seem to make
any difference for typical tooltip content.
Matthias Clasen [Fri, 24 Jan 2020 02:00:40 +0000 (21:00 -0500)]
Adwaita: Drop menuitem support
menuitems don't exist anymore.
Matthias Clasen [Thu, 23 Jan 2020 23:51:42 +0000 (18:51 -0500)]
css: Print selectors
Add code that prints all the selectors when a theme
is loaded. #ifdefed out.
Timm Bäder [Fri, 24 Jan 2020 05:18:03 +0000 (06:18 +0100)]
widget: Use gsk_transform_transform_point() in gtk_widget_pick()
This also covers the 2D_AFFINE case.
Timm Bäder [Wed, 22 Jan 2020 07:38:55 +0000 (08:38 +0100)]
gl renderer: handle cross-fade nodes with invisible children
Timm Bäder [Wed, 22 Jan 2020 07:38:41 +0000 (08:38 +0100)]
gl renderer: Handle blur nodes with invisible children
Timm Bäder [Wed, 22 Jan 2020 07:32:11 +0000 (08:32 +0100)]
gl renderer: Make render_rounded_clip_node clearer
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 [Fri, 24 Jan 2020 04:11:49 +0000 (23:11 -0500)]
colorbutton: Use a css name
This was the sole widget to show up as 'widget' in
the css tree.
Matthias Clasen [Fri, 24 Jan 2020 01:21:08 +0000 (20:21 -0500)]
testsuite: Update mark names
We've changed some of the profiler mark names to
be clearer and more unique. Update the tests that
look for those marks to use the new names.
Matthias Clasen [Thu, 23 Jan 2020 23:50:39 +0000 (18:50 -0500)]
Adwaita: Use child selectors in many more places
These are much cheaper to match than descendent
selectors, so use them whenever we know the element
is a direct child.
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.