Commit Graph

60449 Commits

Author SHA1 Message Date
Matthias Clasen
c8485af819 Use the v9 image for ci runs
The v9 image add sysprof-devel, so we can build
and run performance tests using libsysprof.
2020-01-21 19:30:59 -05:00
Matthias Clasen
704a659438 ci: Build with profiler support
This will let us run sysprof-based performance tests.
2020-01-21 18:20:05 -05:00
Matthias Clasen
d32b0d3118 ci: Add sysprof-devel to the image
We need it to build with profiler support.
2020-01-21 18:17:50 -05:00
Matthias Clasen
23426b0f39 Fix testsuite without -Dprofiler=true
Only build and run the performance tests if we have sysprof.
2020-01-21 18:09:43 -05:00
Matthias Clasen
417edd28fb Run the css performance test in the testsuite
The numbers just end up in the testlog for now.
2020-01-21 17:49:40 -05:00
Matthias Clasen
ea17728ee5 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.
2020-01-21 17:31:48 -05:00
Matthias Clasen
a6f300cefd widget-factory: Add a way to quit automatically
This can be used to measure startup cost in tests.
2020-01-21 17:31:48 -05:00
Matthias Clasen
05b98c3834 gdk: Make profiler support unconditional
We are still not providing samples unless debugging is enabled.
That needs a bit more work.
2020-01-21 11:50:12 -05:00
Matthias Clasen
820c9403e3 cssnode: Make the profiler support unconditional 2020-01-21 11:38:34 -05:00
Matthias Clasen
509531349d Merge branch 'otte/for-master' into 'master'
selector: Add GtkSelectorCategory

See merge request GNOME/gtk!1337
2020-01-21 16:17:17 +00:00
Benjamin Otte
2a5a52dd4b selector: Add GtkSelectorCategory
This will make it easier to write more complex matching algorithms.
2020-01-21 16:59:37 +01:00
Benjamin Otte
f42e18507f Merge branch 'otte/for-master' into 'master'
Otte/for master

See merge request GNOME/gtk!1336
2020-01-21 14:13:02 +00:00
Benjamin Otte
e6a0a2f587 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.
2020-01-21 14:49:25 +01:00
Benjamin Otte
631ea5caac Merge branch 'otte/for-master' into 'master'
Otte/for master

See merge request GNOME/gtk!1333
2020-01-21 12:09:26 +00:00
Benjamin Otte
d59784f7c7 win32: Don't save/restore the context for querying the font
Use the font in the current state.
2020-01-21 12:48:20 +01:00
Benjamin Otte
193eb5b0dd widget: Remove gtk_widget_get_path() 2020-01-21 12:47:16 +01:00
Benjamin Otte
6a1adf6f1a cssnode: Remove unused widget path vfuncs 2020-01-21 12:47:16 +01:00
Benjamin Otte
563ad2db1b containter: Remove gtk_container_get_path_for_child() 2020-01-21 12:47:16 +01:00
Benjamin Otte
c85d9a3259 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()
2020-01-21 12:47:16 +01:00
Benjamin Otte
b9c81b1b94 widget: Initialize cssnode name asap
That way, it's correct in subclass's init functions.
2020-01-21 12:47:16 +01:00
Matthias Clasen
b52bcf7e0a Merge branch 'matthiasc/for-master' into 'master'
Add some static assertions

See merge request GNOME/gtk!1334
2020-01-21 04:52:12 +00:00
Matthias Clasen
a38ba91e35 Add some static assertions
Add assertions that ensure the relationships between
css property IDs that we rely on are preserved.
2020-01-20 22:54:26 -05:00
Matthias Clasen
a350c2452a Add profiler support for css validation
Push numbers about css validation and style creation
to sysprof.
2020-01-20 21:55:16 -05:00
Benjamin Otte
025902b9fb textview: Make cursor work when blinking is disabled 2020-01-21 01:42:00 +01:00
Matthias Clasen
7e2e92a87e cssselector: Inline a few things 2020-01-19 15:56:54 -05:00
Matthias Clasen
be4d42507c 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.
2020-01-19 15:56:54 -05:00
Matthias Clasen
6e88ccf7fb pick: Take advantage of transform categories
Transform categories let us easily avoid doing matrix math
when we can just do a simple translation.
2020-01-19 15:56:54 -05:00
Matthias Clasen
cec4c15f05 Refactor gtk_widget_pick
Split this into a recursive part and a public
entry point. This lets us avoid some duplicate
checks.
2020-01-19 15:56:54 -05:00
Piotr Drąg
ce1f1f7dec Update Polish translation 2020-01-19 13:04:34 +01:00
Matthias Clasen
95f00c6071 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.
2020-01-18 23:06:25 -05:00
Matthias Clasen
55cfeccfd2 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.
2020-01-18 23:06:25 -05:00
Goran Vidović
2301916fa4 Update Croatian translation 2020-01-19 00:33:57 +00:00
Goran Vidović
bb4efe18b7 Update Croatian translation 2020-01-19 00:13:42 +00:00
Matthias Clasen
a463dccd81 Refine the selector tree printing
Also show which tree nodes have exact matches.
2020-01-18 14:32:55 -05:00
Matthias Clasen
eff129323f Fix a css change testcase
The ui file here was invalid, leading to nonsensical
results.
2020-01-18 14:32:55 -05:00
Matthias Clasen
a5530caec3 Actually turn of css value accounting
We need an #undef here. While doing so, make sure
it compiles without warnings when disabled.
2020-01-18 14:30:23 -05:00
Matthias Clasen
92cfc03821 inspector: Avoid an array overrun
Commit 3f56af3738 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
2020-01-18 11:49:16 -05:00
Matthias Clasen
46bb1a9b6a wayland: Fix release build warnings 2020-01-18 11:49:16 -05:00
Matthias Clasen
19280db075 x11: Fix release build warnings 2020-01-18 11:49:16 -05:00
Piotr Drąg
7210c5484e Update POTFILES.skip 2020-01-18 17:39:53 +01:00
Timm Bäder
433c8307b2 gl renderer: Pull a local variable in the closest scope 2020-01-18 08:49:52 +01:00
Timm Bäder
26506b0a15 cssimagefallback: Don't snapshot invisible colors
This avoids a few render nodes later.
2020-01-18 08:49:52 +01:00
Timm Bäder
f8fa946989 widget: Get opacity without GtkStyleContext
GtkStyleContext is really just unnecessary here.
2020-01-18 08:49:52 +01:00
Timm Bäder
119ebe1d70 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.
2020-01-18 08:49:52 +01:00
Timm Bäder
dda54b2b8f widget: Get DPI from style directly
Instead of going through GtkStyleContext.
2020-01-18 08:49:52 +01:00
Timm Bäder
821efcb725 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.
2020-01-18 08:49:52 +01:00
Timm Bäder
85793fe6b6 testsuite: Update expected css errors 2020-01-18 08:49:52 +01:00
Timm Bäder
dc8dedce07 gl renderer: Draw outset shadows white
and only apply the actual shadow color when we draw them from the
texture. This way we can reuse the cached shadows during color
transitions.
2020-01-18 08:49:52 +01:00
Matthias Clasen
f5182f1c35 css: Mark transform value as computed
This is not very useful, since transitions generate
a ton of transforms anyway.
2020-01-18 08:49:52 +01:00
Matthias Clasen
1efa39672b css: Simplify default values
We no longer need to create one-element arrays or
corners with two identical values.
2020-01-18 08:49:52 +01:00