Matthias Clasen
69016825aa
render node: Optimize type checks
...
The GSK_IS_RENDER_NODE macro is a bit silly,
and not worth having in g_return_if_fail checks
in trivial getters.
2019-06-05 04:25:43 +00:00
Matthias Clasen
e08bab012c
surface: Use surface->display directly
...
No need to go through a public getter
for internal uses.
2019-06-05 04:25:14 +00:00
Matthias Clasen
1a93ab053c
Add a theme loading benchmark
2019-06-05 04:20:31 +00:00
Matthias Clasen
e961943508
Fix a refcounting mishap
...
We were missing a ref, causing caches to go missing
when a window is opened twice.
2019-06-05 02:49:07 +00:00
Matthias Clasen
0aa9e16294
Bring brink skip_allocate
...
This was removed by accident in 580aa8204f
,
together with some no longer needed popover
special-casing.
2019-06-05 00:31:53 +00:00
Matthias Clasen
054b5216a1
Remove debug spew
2019-06-04 23:11:18 +00:00
Timm Bäder
ecb353f4af
Consider all offscreen drawings for the icon cache
2019-06-04 23:00:02 +00:00
Matthias Clasen
259bbdcb09
Share glyph and icon caches
...
Use the same texture atlases to back both
the glyph and icon caches, and unify their
sizes and management. Store big glyphs
in separate textures, so all atlases have
the same size. Tweak some of the eviction
parameters.
We share the caches across all GL contexts
on a display, unless the GSK_NO_SHARED_CACHES
env var is set.
2019-06-04 23:00:02 +00:00
Matthias Clasen
1f70bc4bf3
gdk: Create a global shared GL context
...
Create a global GL context that connects all
GL contexts on a display and lets us share textures
between them.
2019-06-04 23:00:02 +00:00
Matthias Clasen
7293fd517e
glyph cache: Stop storing driver and render
...
This is the first step towards sharing glyph
caches across renderers.
2019-06-04 23:00:02 +00:00
Matthias Clasen
c9cea36b37
gl: Use pad-extend for icon cache
...
Repeat the border pixels to avoid artifacts from
linear scaling.
2019-06-04 23:00:02 +00:00
Matthias Clasen
4020399439
gl: Use linear scaling for atlases
2019-06-04 23:00:01 +00:00
Matthias Clasen
efc31161f0
gl: Allow setting min/mag filter on textures
...
This will be used in the future.
Adapt all callers to pass GL_NEAREST for now.
2019-06-04 23:00:01 +00:00
Matthias Clasen
102cc1c8d3
gl: Add 1 pixel of padding in the icon cache
2019-06-04 23:00:01 +00:00
Matthias Clasen
2529385fe4
glyph cache: Reinstate 1 pixel padding
...
This is necessary to prevent bleeding.
2019-06-04 23:00:01 +00:00
Matthias Clasen
f37274dbb0
gl: Don't leak texture atlases
...
We need to free the texture atlases, and the
textures backing them.
2019-06-04 23:00:01 +00:00
Matthias Clasen
a3757936c1
gl: Free icon data
2019-06-04 23:00:01 +00:00
Matthias Clasen
adb5df020c
glyph cache: Clarify message
...
We have different kinds of caches now.
2019-06-04 23:00:01 +00:00
Timm Bäder
cf4ff56ca5
gl renderer: Add & use icon cache
...
Upload small icons all to the same texture atlas.
2019-06-04 23:00:01 +00:00
Timm Bäder
e2ffad7b07
glimage: Only support uploading one region
2019-06-04 23:00:01 +00:00
Timm Bäder
b74bb90c7d
gl renderer: Move texture atlas into its own file
...
We want to reuse the code later.
2019-06-04 23:00:01 +00:00
Timm Bäder
66b081dc9c
glglyphcache: Use stb_rect_pack for better glyph packing
2019-06-04 22:42:00 +00:00
Benjamin Otte
bb5871fd81
docs: Remove mention of queue_draw_area()
...
and queue_draw_region(). They're gone since 73650c6da2
.
2019-06-04 14:59:32 +00:00
Timm Bäder
4b3986ae1f
rendernodeimpl: Inline container_node_get_bounds into _new
...
It's the only caller of the function and we can avoid a second loop over
all child nodes this way.
2019-06-04 16:48:08 +02:00
Timm Bäder
ac333d712d
snapshot: Make append_node_internal transfer-full
...
There is only one case where we do *not* directly unref the node again
after calling this.
2019-06-04 16:48:08 +02:00
Benjamin Otte
5c0737e44c
Merge branch 'for-master' into 'master'
...
For master
See merge request GNOME/gtk!911
2019-06-04 04:24:28 +00:00
Benjamin Otte
098f182d8f
widget-factory: Show proper separators
2019-06-04 06:11:44 +02:00
Benjamin Otte
836635d1ae
builder: Allow values of type GType
...
In particular this allows setting the item-type property of GListStore.
2019-06-04 06:11:44 +02:00
Benjamin Otte
6a0e0031b1
builder: Make GListStore buildable
...
Treats GListStore like any other object and allows <child> to add items
to it.
2019-06-04 06:11:44 +02:00
Benjamin Otte
24effe45cc
testsuite: Add tests for printing/parsing transforms
2019-06-03 19:12:03 +02:00
Matthias Clasen
206970c1e8
Merge branch 'transform-tests' into 'master'
...
Transform tests
See merge request GNOME/gtk!910
2019-06-03 16:41:17 +00:00
Matthias Clasen
2f7047147d
gsk: Add some more transform tests
...
Tests around identity. Seems trivial, but
still managed to find a bug.
2019-06-03 16:20:38 +00:00
Matthias Clasen
4ed57449ba
gsk: Fix printing of identity transforms
...
These need to print as "none", otherwise
the parser does not accept them.
2019-06-03 16:20:38 +00:00
Matthias Clasen
d93fb5a3fa
Cosmetics
...
Fix up a variable name mismatch in GskTransform docs.
2019-06-03 16:15:16 +00:00
Matthias Clasen
0ab4a232b7
Move transform tests to the gsk suite
...
That is where they belong.
2019-06-03 16:10:09 +00:00
Benjamin Otte
4efa457a63
Merge branch 'for-master' into 'master'
...
rendernodeparser: Handle Cairo being stupid
See merge request GNOME/gtk!909
2019-06-03 15:45:20 +00:00
Timm Bäder
a1161456ff
GskTransform: NULL is a valid transform
2019-06-03 17:36:31 +02:00
Benjamin Otte
d81cf5a443
rendernodeparser: Handle Cairo being stupid
...
Cairo writes to finished streams, so we have to make sure to keep the
stream around to allow it to do that.
2019-06-03 17:22:11 +02:00
Timm Bäder
a0cb68283d
gl renderer: Dont' memcmp() a GskTransform
2019-06-03 17:07:26 +02:00
Timm Bäder
88344ccf4e
widget: Unref priv->{allocated_,}transform
2019-06-03 17:03:02 +02:00
Timm Bäder
d228f4bb76
gl renderer: Don't ref transform twice
...
That's gonna leak it otherwise.
2019-06-03 17:03:02 +02:00
Timm Bäder
3a49c0eb2f
glyphcache: Don't leak hashtables
2019-06-03 17:03:02 +02:00
Timm Bäder
05ca772631
GskTransform: Ignore identity transforms
...
We often end up with e.g. a scale of 1 or a translation by 0/0. Ignore
those transforms since they don't do anything.
2019-06-03 17:03:02 +02:00
Timm Bäder
efe9bba343
gl renderer: Ref transform before using it
...
Fixes #1929
2019-06-03 17:03:02 +02:00
Timm Bäder
fb1f929c38
gl renderer: Dont' unnecessarily to_matrix transforms
2019-06-03 17:03:02 +02:00
Matthias Clasen
6560a35c9c
Merge branch 'menu-sizing' into 'master'
...
menu: Update scrollbar policy
Closes #1930
See merge request GNOME/gtk!908
2019-06-03 14:57:46 +00:00
Matthias Clasen
c7ccaa5ef2
menu: Update scrollbar policy
...
We want to avoid sizing problems for small menus
due to the vertical scrollbar imposing a min-height on
its slider.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1930
2019-06-03 14:49:13 +00:00
Benjamin Otte
3ae15aad16
Merge branch 'cherry-pick-ae2ef147' into 'master'
...
gtk: fix weed_out_neg_zero() in spinbutton and scale
See merge request GNOME/gtk!906
2019-06-03 11:29:54 +00:00
Daniel Mustieles
42e0c9892c
Updated Spanish translation
2019-06-03 12:26:36 +02:00
Matthias Clasen
286fd742a6
Merge branch 'glyph-memdup' into 'master'
...
gl: Avoid a memdup in glyph upload
See merge request GNOME/gtk!907
2019-06-03 03:07:31 +00:00