Commit Graph

2271 Commits

Author SHA1 Message Date
Matthias Clasen
678e6fc6d6 nodeeditor: Make the help window wide enough
Make the help window wide enough to show the
tables without wrapping.
2021-04-11 12:50:34 -04:00
Matthias Clasen
e4a6101ae0 gtk-demo: Make one text scroll benchmark harder
Add underlines into the mix with the Emoji heavy
text, to see if we can optimize lines.
2021-04-08 23:34:36 -04:00
Matthias Clasen
cb18437908 widget-factory: Name an event controller
This helps with debugging.
2021-04-02 22:23:34 -04:00
Matthias Clasen
1e1f199b56 node-editor: Support pasting the image
Add a button that copies the image to the clipboard.
2021-04-02 21:24:59 -04:00
Matthias Clasen
e964e176f9 widget-factory: Use the new themes
Update the Style menu to switch between the variants
of the Default theme.
2021-04-01 12:27:35 -04:00
Matthias Clasen
8b64f0147c gtk-demo: Allow opening images in video player
It works, so why not.
2021-03-29 23:40:17 -04:00
Matthias Clasen
43a1641dd7 Add a frame benchmark
This can be used to gauge what fps we can hope for
in the best case, on a given system.
2021-03-29 08:27:43 -04:00
Matthias Clasen
3ab07203ce widget-factory: Add missing icons
This removes all the cases where we were showing a missing-image
when running with the hicolor icontheme.
2021-03-26 14:34:40 -04:00
Matthias Clasen
6ba414216c widget-factory: Drop two icons from the iconview
This avoids the scrollbar by default, which is nice.
2021-03-26 13:30:46 -04:00
Matthias Clasen
4028bd5bce widget-factory: Add emblem-shared-symbolic icon
We use it, so include it.
2021-03-26 11:59:37 -04:00
Matthias Clasen
0ee6868b7f gtk-demo: Add a test for scrolling with Emoji
Make a text with lots of Emoji and text. This
is exercising the GL renderers switching between
different shaders for color and plain glyphs.
2021-03-12 13:19:37 -05:00
Matthias Clasen
062383bfd3 node-format: Small docs fixes 2021-03-08 17:49:21 -05:00
Matthias Clasen
d3d49ce7f1 iconbrowser: fix search<>category interaction
Make search act like a separate, filtered view of
all icons. This is how it worked in gtk3, and how
it should be.

Fixes: #3717
2021-03-04 19:30:02 -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
Shengyu Zhang
55bfadadc4 gtk-demo: Fix typo GtkKabel -> GtkLabel 2021-02-21 16:20:22 +00:00
Matthias Clasen
516776b630 gtk-demo: Make --version match about
Print the same version information in --version
that we show in the about dialog.
2021-02-18 22:52:15 -05:00
Matthias Clasen
4d0a1a97cc widget-factory: Make --version match about
Print the same version information in --version
that we show in the about dialog.
2021-02-18 22:51:35 -05:00
Matthias Clasen
3aa3c21d69 demos: Add devel styling
Add a -Dprofile=devel meson option, and add some visual
hints to the demos that you are running a nightly build.
2021-02-12 00:08:55 -05:00
Matthias Clasen
befc2c3ed6 iconbrowser: Use the right icon
We have an app icon, lets use it.
2021-02-10 08:04:11 -05:00
Matthias Clasen
62788d5b0d print-editor: Use the non-devel icon
We are no longer a nightly print editor.
2021-02-10 07:52:29 -05:00
Matthias Clasen
3c91a2b0a8 node-editor: Use the non-devel icon
We're now a respectable, stable node editor.
2021-02-10 07:44:59 -05:00
Matthias Clasen
15c36aaa1e iconbrowser: Make image dnd work again
We need to drag a texture, not a paintable.

Fixes: #3648
2021-02-04 20:47:19 -05:00
Matthias Clasen
1484b4ae9f node editor: Add a dark mode toggle
This is useful to see light rendering clearly.
2021-01-30 19:57:24 -05:00
Timm Bäder
aba14e6a43 node editor: Show some default node data
Show case the icon and the render node format this way.
2021-01-29 09:45:25 +01:00
Timm Bäder
00956a3770 node editor: Make help textview monospace
Otherwise the nice markdown tables don't line up.
2021-01-29 08:07:39 +01:00
Matthias Clasen
f974c5343e Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master

See merge request GNOME/gtk!3038
2021-01-05 16:49:53 +00:00
Matthias Clasen
36eb7c40d0 gtk-demo: Small a11y fix
Label the entry in the assistant demo.
2021-01-05 11:16:10 -05:00
Matthias Clasen
b79c26b39e Merge branch 'wip/baedert/for-master' into 'master'
Wip/baedert/for master

See merge request GNOME/gtk!3029
2021-01-05 15:20:25 +00:00
Matthias Clasen
fb31581bb4 gtk-demo: Use GtkVideo in the fishbowl
The demo is called 'Video', so we should actually
use a GtkVideo widget. Doing things this way has
the advantage that we get GL support, which wasn't
working with GtkPicture.
2021-01-04 18:26:29 -05:00
Timm Bäder
afabbc4957 gtk4-demo: Remove unused size group 2021-01-03 11:01:28 +01:00
xndcn
34ffdc6e3f gl: Fix implicit leaking of shader object
According to OpenGL spec, a shader object will only be flagged
for deletion unless it has been detached; when a program object
is deleted, those shader objects attached to it will be detached
but not deleted unless they have already been flagged for deletion.

So we shall detach a shader object before it is deleted, and delete
it before the program object is deleted best.
2020-12-29 23:50:45 +08:00
Emmanuel Gil Peyrot
dd1110ca5c Fix some of gtk4-demo’s transitions example on OpenGL ES
Same issue as the previous commit, int+float is error, and pow() only
works on floats.
2020-12-25 01:36:21 +01:00
Benjamin Otte
2a8f371643 gtk-demo: Don't put the search bar in the scroll area
1. That's a bad idea UI wise as you can't see the search after you
   scrolled.

2. That's a bad idea code-wise because Listviews need to be put into
   a ScrolledWindow or they won't scroll.
2020-12-24 06:38:45 +01:00
Emmanuele Bassi
6039a36183 Merge branch 'ebassi/for-master' into 'master'
Clean up the build system

See merge request GNOME/gtk!2955
2020-12-15 16:54:59 +00:00
Matthias Clasen
7335e166b7 Update the node format docs
Update this document to mention all the render nodes we
have, and the default values for their properties.
2020-12-15 10:30:18 -05:00
Emmanuele Bassi
99e0929d6c build: Use a consistent style for Meson files 2020-12-15 12:46:59 +00:00
Matthias Clasen
c0ed89be9a widget-factory: Autoplay the video
The empty video on the frontpage is a bit of a letdown, since
the big arrow can't be clicked.
2020-12-09 10:52:55 -05:00
Matthias Clasen
ade4bcb125 Remove NoDisplay from demo desktop files
When these are installed (in particular, as flatpaks),
we should not hide them.

Fixes: #2932
2020-12-09 10:09:06 -05:00
Sophie Herold
a36ccd7f42 gtk-demo: Remove potentially ableist metaphor 2020-12-08 23:02:03 +00:00
Jonas Ådahl
27077d5be8 gtk/window: Make 'default-size' adapt to configured size
This commit changes the behavior of window size computation and the
default size properties to:

 * The default-width and default-height properties are updated to the
   current window size unless the size is fixed by e.g. being maxmized,
   tiled etc.
 * The compute-size semantics are to just pick the default size, or if
   not adequate, use the measured size, and consequently update the
   default size, unless unresizable.
 * gtk_window_get_size() is removed, what's more likely relevant is the
   gtk_window_get_default_size() which will now contain more sensible
   values.

Various places that used gtk_window_get_size() were updated to use
gtk_window_get_default_size() to remember and restore previous sizes.

This also changes the default value of 'default-width' and
'default-height' from -1 to 0. The gtk builder simplify tool is taught
how to omit when the default size is set to both -1 and 0.
2020-12-07 20:37:29 +01:00
Jonas Ådahl
2cddec7798 gtk/popover: Use gtk_popover_present() instead of going via GtkNative
This makes it more explicit that managers of popovers make it "present".
2020-12-07 20:37:29 +01:00
Matthias Clasen
423b8209a1 gtk-demo: Use a native filechooser in the words demo 2020-12-03 22:31:05 -05:00
Matthias Clasen
d83554121f gtk-demo: Use a native file chooser in the svg demo 2020-12-03 19:44:45 -05:00
Matthias Clasen
2688b94133 gtk-demo: Use a native filechooser in the video demo 2020-12-03 19:44:34 -05:00
Matthias Clasen
e035baee8a gtk-demo: Remove empty row in the pickers demo
The file chooser button is gone.
2020-12-03 19:25:04 -05:00
Christian Hergert
8e62ff50fe demos: make alienplanet demo work on macOS OpenGL
On the macOS OpenGL implementation, the use of noise2 as a
function within the glsl shader collides with the builtin noise2 of a
different signature.

This changes the name to something similar (noize2) so that we
do not risk colliding names when linking.

With this commit, the shadertoy alienplanet demo works on mac
OpenGL (albeit still with the Cairo renderer).
2020-12-03 10:23:13 -08:00
Matthias Clasen
6e67d44aa3 Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master

Closes #3429

See merge request GNOME/gtk!2912
2020-12-03 03:43:19 +00:00
Benjamin Otte
eb9c204535 gtk: Remove GtkFileChooserButton
... as discussed in the meeting.
2020-12-03 02:02:27 +01:00
Matthias Clasen
714c610d6b gtk-demo: Add a search button
Easter eggs are great, but search shouldn't be one.
2020-12-02 19:53:55 -05: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