Commit Graph

1002 Commits

Author SHA1 Message Date
Alexander Mikhaylenko
7aa34cb3d2 inspector: Add a separator under toolbar in css editor
Same as object properties.
2021-10-24 03:55:26 +05:00
Alexander Mikhaylenko
3aee23c172 inspector: Use tabular figures for list position label
Avoid buttons jumping around while moving through list models.
2021-10-24 03:37:01 +05:00
Alexander Mikhaylenko
bec9141233 inspector: Use .toolbar for toolbars
Remove all of the manual margins, spacing and has-frame=0, be more
consistent.
2021-10-24 03:37:01 +05:00
Alexander Mikhaylenko
131683fdcf inspector: Use a GtkSeparator for the object details toolbar
Remove a hardcoded light grey border from the sidebar that was used for
this.
2021-10-24 02:53:22 +05:00
Alexander Mikhaylenko
8176b0c2fc inspector: Remove list header style
The one from the theme works just fine.
2021-10-24 02:51:07 +05:00
Matthias Clasen
144f727d5a Rename ngl to gl
We have only one gl renderer now, and it is
a bit odd for it not be called gl.
2021-10-07 13:05:53 -04:00
Matthias Clasen
3f5107cea5 inspector: Export gtk_inspector_init
Quietly export this function mainly for the benefit
of libadwaita, which can can use this to install its
implementation of the gtk-inspector-page extension
point.
2021-10-05 20:10:34 -04:00
Benjamin Otte
659181f74b win32: Fix GTK warnings 2021-09-24 23:26:45 +02:00
Benjamin Otte
a29474567a gdk: Remove gdkinternals.h 2021-09-24 22:50:29 +02:00
Benjamin Otte
811b5d995b gdk: Don't include gdkinternals.h in gdk-private.h 2021-09-24 22:11:57 +02:00
Timm Bäder
2bc82da34d inspector: Cache if we have ever constructed a window
Silly optimization to get rid of

gtk_main_do_event
  gtk_inspector_handle_event
    gtk_inspector_window_get_for_display
      g_object_get_data

showing up in profiles even though it's useless since we've never even
created any inspector window in the first place.
2021-09-18 08:29:18 +02:00
Matthias Clasen
d75246a543 inspector: Cosmetics
Make some settings entries smaller, and make the
scales match in size. Also, inline adjustments
in the ui file, since we can do that now.
2021-09-05 12:59:11 -04:00
Benjamin Otte
cbc050b9ed recorder: Make the render nodes in the list draggable
You can (soon) drag any of the nodes directly into the node-editor.
2021-08-30 06:02:16 +02:00
Benjamin Otte
72e2a46c05 inspector: Add support for displaying GL errors
Also, no need to show a GL version if GL isn't available.
2021-07-22 16:27:32 +02:00
Christian Hergert
352898ae9e inspector: fix compilation with broadway 2021-06-17 11:54:00 -07:00
Matthias Clasen
8c75e6896e inspector: Use new get_egl_display apis
This makes the code a bit more concise.

Also, get WGL information when we are using it.
2021-05-13 15:25:18 -04:00
Matthias Clasen
ea162ed016 inspector: Avoid a crash with GL variants
When configuring the inspector display, preserve
debug flags that affect which GL variant we pick.
Otherwise, we may end up with a GLX context on the
default display, and an EGL context on the inspector
one. This hopelessly confuses libepoxy, and things
don't go well when that happens.
2021-05-10 21:25:08 -04:00
Matthias Clasen
e2aa161590 inspector: Show EGL info for X11 as well 2021-05-10 21:24:50 -04:00
Matthias Clasen
a723baec4b inspector: Show text direction
This is not a property, so show it on the misc tab.
2021-05-10 20:55:43 -04:00
Matthias Clasen
564d835fba Merge branch 'broadway-display-scale' into 'master'
broadway: Add a setter for display scale

Closes #3934

See merge request GNOME/gtk!3538
2021-05-10 20:11:38 +00:00
Matthias Clasen
b13c2e17f1 inspector: Support scale changes on Broadway 2021-05-10 10:55:41 -04:00
Matthias Clasen
0108ffe059 inspector: Fix saving css
g_file_replace_contents() does not accept -1
as length, unlike similar apis.
2021-05-09 11:19:43 -04:00
Matthias Clasen
f9d6134247 inspector: Improve monitor information display
Avoid a nested listbox, show the connector,
don't show information we don't have. Also,
disconnect all signal handlers from the display
when the inspector is going away.
2021-05-02 21:02:09 -04:00
Matthias Clasen
dfecc8fe02 inspector: Show keyboard layouts 2021-05-02 21:02:09 -04:00
Matthias Clasen
ecfba2d31b Inspector: Fix a possible undefined use 2021-04-12 21:22:46 -04:00
Matthias Clasen
e7284c23da inspector: Support copying nodes to clipboard
Add a button that copies the serialization of the
selected node to the clipboard.
2021-04-02 21:38:14 -04:00
Matthias Clasen
c5aa35f8ef inspector: Allow inspecting Unicode
Add a way to show text as a Unicode sequence.
This can be helpful in understanding what is
happening with text.
2021-03-21 16:05:10 -04:00
Matthias Clasen
a576bd190b inspector: Respect GDK_DEBUG=vulkan-disable
Respect the debug settings for disabling Vulkan or GL,
and do not try to initialize those contexts. This can
be necessary to work around crashes.

Fixes: #3748
2021-03-17 23:19:08 -04:00
Matthias Clasen
5556907194 inspector: Fix surface transform regression
Ever since we added surface-to-widget transforms,
the autofading of the fps overlay did not work anymore,
since it was given the transient transform node, most
of the time.

Fix this by passing both the root of the node tree and
the node for the toplevel widget to prepare_render, and
hande the widget node to the overlays. Update the
affected overlays that need to have their positioning
adjusted.
2021-03-09 18:27:04 -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
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
Emmanuele Bassi
a63a2b26cf Ensure we don't overflow when using g_memdup2()
When we turn integers into size_t we should check we're not going to
make a mess.
2021-02-11 14:22:23 +00:00
Matthias Clasen
1ac9400712 Drop unused logo resource
The inspector no longer sets a window icon.
2021-01-28 12:27:07 -05:00
Matthias Clasen
ccd9827b63 inspector: Redo the actions page
Don't create widgets in bind, instead just set
the new action on the action-editor, and let it
recreate the parts that need to be recreated.
2021-01-21 10:25:13 -05:00
Matthias Clasen
db189cfb9f inspector: Reshuffle action editor
Prepare the action editor for being able to change its
actions after creation.
2021-01-21 10:24:31 -05:00
Matthias Clasen
7527f181d5 inspector: Simplify action editor
We are not using the size group anymore, so drop it.
2021-01-21 10:20:21 -05:00
Matthias Clasen
c05b418512 inspector: Split out variant editor 2021-01-21 10:19:18 -05:00
Matthias Clasen
e97d996fe4 inspector: Redo the shortcuts page
Use a column view here.
2021-01-21 10:19:18 -05:00
Matthias Clasen
0537b167ca inspector: Redo the controllers page
Use a column view, and only show the widgets own
controllers.
2021-01-21 10:19:18 -05:00
Matthias Clasen
fff6b35821 inspector: Redo the controllers page
Use a column view, and only show the widgets own
controllers.
2021-01-20 18:51:01 -05:00
Matthias Clasen
d7060025e0 inspector: Avoid a critical
Avoid a critical when closing the inspector with the
recorder page open.
2021-01-17 10:55:53 -05:00
Matthias Clasen
691b6b88ea inspector: Add a legend for the layout overlay
Colors are more useful if you know what they represent.
2021-01-16 12:38:24 -05:00
Matthias Clasen
e854b90293 Merge branch 'wip/baedert/for-master' into 'master'
Wip/baedert/for master

See merge request GNOME/gtk!2990
2020-12-22 04:53:31 +00:00
Matthias Clasen
147386189f inspector: Show glyphs as in node files
Reuse the glyph serialization code from gsk to
show glyphs in the same way here.
2020-12-21 13:11:46 -05:00
Timm Bäder
c34f98931e layoutoverlay: Avoid adding transparent color nodes
We have a region for the border here, but the color is defined as
transparent black because we don't want to render anything for it.

This way, the generated .node file for the listbox demo in gtk4-demo
with enabled layout borders is 3.5MB instead of 3.8MB.
2020-12-21 10:26:03 +01:00
Timm Bäder
2feac2772f layoutoverlay: Avoid adding 0 sized color nodes
This way, the output node file of the listbox demo in gtk4-demo with
enabled layout borders is only 3.8MB instead of 12MB.
2020-12-21 10:26:03 +01:00
Benjamin Otte
55a242bd81 gsk: Add GskConicGradientNode 2020-12-03 00:47:54 +01:00
Emmanuele Bassi
ac473282a2 Port CellRendererGraph to preferred size vfuncs
Drop use of GtkCellRendererClass.get_size()
2020-11-28 19:21:24 +00:00
Matthias Clasen
b75b359f19 Drop devel styling from our windows
We are about to do a stable release. Time to get used
again to plain old, boring header bars.
2020-11-23 12:10:01 -05:00
Matthias Clasen
c1e05e7c52 Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master

Closes #3278

See merge request GNOME/gtk!2856
2020-11-17 19:25:05 +00:00