Timm Bäder
13c0a9e27b
iconcache: Replace broken debugging code
2019-08-11 09:05:31 +02:00
Timm Bäder
2914c360a9
gl renderer: Implement a subset of repeat nodes
2019-08-11 09:05:31 +02:00
Matthias Clasen
660f46fcb1
Merge branch 'glsl-switch' into 'master'
...
glsl: don't use switch statements
See merge request GNOME/gtk!1036
2019-08-02 16:59:27 +00:00
Matthias Clasen
b576aef2b1
Revert "gl: Simplify glyph cache rendering"
...
This reverts commit 7a3eaad193
.
The reason we want to keep using pango here
is that we get hex boxes and similar drawing
features that way.
2019-08-01 00:18:19 -04:00
Elias Aebi
a357995484
glsl: don't use switch statements
2019-07-31 18:48:54 +02:00
Matthias Clasen
d276d2629a
gl: Glyph cache fixes
...
Pass the full location to the glyph cache lookup,
and use the same rounding as cairo does. This makes
the output much closer to the cairo renderer.
2019-07-31 00:03:13 -04:00
Matthias Clasen
5dd8801ee5
gl: implement subpixel positioning
...
Pass the glyph position into the glyph caching functions,
not just the glyph index. This allows us to cache different
images for different subpixel positions.
2019-07-28 16:42:52 -04:00
Matthias Clasen
5c9643b6eb
vulkan: implement subpixel positioning
...
Pass the glyph position into the glyph caching functions,
not just the glyph index. This allows us to cache different
images for different subpixel positions.
2019-07-28 16:42:52 -04:00
Matthias Clasen
7a3eaad193
gl: Simplify glyph cache rendering
...
We are currently using a weird mix of pango and cairo,
but there is no need for us to go through a pango
renderer here; we can just use cairo directly.
2019-07-28 09:54:17 -04:00
Timm Bäder
2c38b71ca5
glyph cache: Upload large glyphs in lookup () directly
...
Instead of relying on a texture id of 0, which can happen for other
reasons, e.g. when the glyph is being scaled too small.
Fixes part of #2046
2019-07-28 12:00:15 +02:00
Timm Bäder
1c93bef0d5
glyph cache: check glyphs for scaled size
...
We can't rely on just the ink_rect, since that might be without the
scaled applied, which is what ends up on the texture.
Fixes #2046
2019-07-28 10:58:10 +02:00
Timm Bäder
58e8dd1c0d
gl renderer: Fix dx/dy handling on hidpi
...
Fixes misplaced error squiggles in the node editor.
2019-07-26 16:27:39 +02:00
Timm Bäder
b8bbf7b63b
gl renderer: Rework transform handling
...
Fix all the ref counting mishaps. Makes hidpi work again and without
memory leaks.
2019-07-26 15:35:06 +02:00
Matthias Clasen
2803bd93ce
gsk: Fix a crash in gsk_render_node_diff
...
The only thing worse than freeing the same
cairo region twice is freeing it three times.
2019-07-21 13:18:58 -07:00
Timm Bäder
731613d70b
gl renderer: Remove leftover modelview matrix
...
We use a GskTransform there nowadays.
2019-07-21 12:45:10 +02:00
Timm Bäder
5f21c45f75
Revert "gl renderer: ops_set_modelview is (transfer full)"
...
This reverts commit e904c49e8a
.
This breaks HiDPI setups, i.e. setups where the call to
ops_set_modelview does not end up with a NULL transform.
2019-07-21 12:45:10 +02:00
Timm Bäder
6e47ebe030
rendernodeparser: Fix a memory leak when parsing glyphs
2019-07-21 09:06:50 +02:00
Timm Bäder
9728dabf12
rendernodeparser: Fix a memory leak when parsing textures
2019-07-21 09:06:29 +02:00
Timm Bäder
e904c49e8a
gl renderer: ops_set_modelview is (transfer full)
...
regarding the passed modelview matrix
2019-07-21 09:06:10 +02:00
Timm Bäder
27ddd39d69
gl renderer: Pull out code from a loop
...
Does not not actually depend on anything done inside the loop.
2019-07-21 08:39:25 +02:00
Timm Bäder
5910a28aa5
gl renderer: Replace a redundant function call
...
We're already getting the radius from the node above.
2019-07-19 18:14:50 +02:00
Timm Bäder
b9b5072668
gl renderer: Fix opacity nodes with overlapping child nodes
2019-07-14 10:08:04 +02:00
Timm Bäder
984dff54ab
rendernodeparser: fix typo
2019-07-13 11:12:47 +02:00
Matthias Clasen
bda3c6c084
Merge branch 'wip/baedert/for-master' into 'master'
...
Improve the valgrind experience
See merge request GNOME/gtk!984
2019-07-09 19:39:13 +00:00
Timm Bäder
f286c99338
Merge branch 'gltexsubimage2d' into 'master'
...
use glTexSubImage2D instead of glTextureSubImage2D
Closes #2005
See merge request GNOME/gtk!986
2019-07-08 07:14:13 +00:00
Timm Bäder
b062594ae6
gl renderer: Properly clean up program state transforms
2019-07-07 07:24:00 +02:00
Timm Bäder
dbc49e7742
transform: Fix identity transform fast paths
...
Returning an extra ref will cause leaks later.
2019-07-07 07:24:00 +02:00
Elias Aebi
ea6d3f589f
use glTexSubImage2D instead of glTextureSubImage2D
2019-07-06 16:23:21 +02:00
Elias Aebi
1e6120e776
glsl: use float literals
2019-07-06 14:42:08 +02:00
Timm Bäder
3bc3e140dd
transform: Add transform_bounds fast path for 2D_AFFINE transforms
...
E.g. anything involving a scale. This is important when e.g. scrolling
in the node list in the recorder, which scales every recorded node down
to fit in the list.
2019-06-29 09:49:38 +02:00
Timm Bäder
6b42e5b433
gl renderer: Fix push/pop modelview behavior
2019-06-29 08:57:27 +02:00
Timm Bäder
99c01607f1
gl renderer: Remove some dead code
2019-06-29 08:53:36 +02:00
Timm Bäder
071748592d
gl renderer: Don't upload GL textures into the icon cache
2019-06-29 07:15:43 +02:00
Timm Bäder
8dd74eac2e
transform: Add skew parsing
2019-06-29 07:15:43 +02:00
Benjamin Otte
4a19bab5b3
gsk: Fix annotations for ref()/unref()
2019-06-18 15:58:49 -04:00
Matthias Clasen
c168116e64
Merge branch 'wip/matthiasc/shared-glyph-cache' into 'master'
...
Share the glyph cache
See merge request GNOME/gtk!912
2019-06-05 12:10:24 +00:00
Matthias Clasen
0dcb71722a
Cosmetics
...
Rename some arguments, since atlases->atlases is awful.
2019-06-05 12:03:39 +00:00
Matthias Clasen
d90143d09c
texture atlas: Add a missing initialization
...
Pointed out by Timm.
2019-06-05 12:00:53 +00:00
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
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
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
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