Timm Bäder
4f5a9be465
gl renderer: Get blur node child only once
2019-10-11 22:31:33 +02:00
Timm Bäder
6a4c778791
gl renderer: Shorten function
2019-10-11 22:31:33 +02:00
Timm Bäder
1caa95b814
gl renderer: Avoid copying a rect
2019-10-11 22:31:33 +02:00
Matthias Clasen
cf44ba7847
gl: Avoid stray use of doubles
...
Everything else in this code is floats,
so stick to that and avoid unnecessary
precision.
2019-10-11 16:16:09 -04:00
Matthias Clasen
30433d7659
Cosmetics
2019-10-11 16:16:09 -04:00
Matthias Clasen
849b950763
gl: glyph cache tweaks
...
Reduce the cost of lookups by storing
the hash value directly.
2019-10-11 16:15:15 -04:00
Matthias Clasen
8937cd992d
gl: Shrink CachedGlyph structs slightly
...
Plug a hole in this struct.
2019-10-11 16:15:14 -04:00
Matthias Clasen
e296c6a356
gsk: Store color bit info in text nodes
...
Keep the 'has color glyphs' info in text nodes,
instead of determining it over and over in both
the vulkan and gl backends.
2019-10-11 16:15:14 -04:00
Timm Bäder
136400e8a2
gl renderer: Remove unused modelview matrix
2019-10-11 16:56:24 +02:00
Timm Bäder
90199534e0
gl renderer: Don't copy outset shadow node outline
2019-10-11 16:38:58 +02:00
Timm Bäder
f7c64b4ebb
gl renderer: Don't copy colors into render ops
2019-10-11 15:06:51 +02:00
Timm Bäder
2977e91aed
gl renderer: Grow unblurred outset shadow outline on the gpu
2019-10-11 10:16:39 +02:00
Timm Bäder
0b999c73d1
gl renderer: Fix glsl rounded rect shrinking
...
Previous code would add rounded corners to a rect with all 0 corners
when growing.
2019-10-11 10:15:58 +02:00
Timm Bäder
9b1e0dd4a3
gl renderer: Cosmetics
2019-10-11 09:32:24 +02:00
Timm Bäder
a29826bb71
gl renderer: Only add outset shadow center piece if dx/dy != 0
2019-10-11 08:46:33 +02:00
Christian Hergert
528297f5e5
gl: avoid copying RenderOp to GArray
...
Instead of copying the (rather large) RenderOp to the GArray, we can
simply set the fields directly in the allocated space for the struct.
In most cases, there wont be any allocations to make as the array size
is kept in tact across frame renderings.
2019-10-09 15:41:53 -07:00
Christian Hergert
b29feb193e
gl: use memcmp to compare glyph cache keys
...
We can just use memcmp here because even in the use of lookup keys with
C99 initializers, we can rely on any space between fields added by the
compiler to be zeroed. So we might as well use wider memory cmopares.
2019-10-09 14:47:23 -07:00
Christian Hergert
e32c992886
gl: avoid copying GskGLCachedGlyph in lookup
...
This saves a minor amount of CPU time by avoiding the copy of structure
on each lookup (which is short-lived).
2019-10-09 14:37:08 -07:00
Christian Hergert
c9ca60c201
gl: short-circuit on NULL program
...
The NULL check is a more inclusive check than each of the individual
op->op checks.
2019-10-09 11:51:32 -07:00
Timm Bäder
329f7c1c40
gl renderer: Remove rounded rect intersection code
...
Caused correctness issues.
Fixes #1917
2019-10-09 16:57:22 +02:00
Timm Bäder
e838ea3bc8
gl renderer: Fix scaled fallback node drawing
2019-10-09 16:57:22 +02:00
Christian Hergert
47ef5af778
gl: remove stray +
2019-10-08 10:58:29 -07:00
Christian Hergert
76ea157f17
rendernode: remove unused macros
2019-10-08 10:57:45 -07:00
Georges Basile Stavracas Neto
a2b49322fb
vulkan/renderpass: Use GENERAL for initial layout
...
UNDEFINED initial layouts may not preserve the contents
of the attachment after transitioning the layout. We want
them to be preserved because we do partial rendering.
Use GENERAL as the initial layout for render passes.
2019-10-05 12:13:22 -03:00
Georges Basile Stavracas Neto
0b2006b74f
vulkan/image: Set HOST and TRANSFER bits for before barriers
...
Multiple images in the before barrier array are defined with
VK_ACCESS_TRANSFER_WRITE_BIT and VK_ACCESS_TRANSFER_READ_BIT,
which requires passing VK_PIPELINE_STAGE_TRANSFER_BIT and
VK_PIPELINE_STAGE_HOST_BIT to vkCmdPipelineBarrier().
Pass these flags correctly.
2019-10-05 12:13:22 -03:00
Timm Bäder
e05b87c8d0
gl renderer: Fix rounded rect intersection
2019-09-25 17:51:52 +02:00
Timm Bäder
c9241e83dd
gl renderer: Remove unused matrix
2019-09-09 17:36:25 +02:00
Timm Bäder
6c90d3a1b6
gsktransform: Fix documentation comment
...
There is no @m.
2019-09-09 17:36:23 +02:00
Rico Tzschichholz
5504c62af9
gsk: Add missing 'transfer full' annotations of instance parameters
...
Fixes https://gitlab.gnome.org/GNOME/gtk/issues/2107
2019-08-26 18:05:17 +02:00
Дилян Палаузов
6ded38de2b
Minor typos in the Documentation (a/an)
2019-08-25 12:52:46 +00:00
Timm Bäder
251bf45cf2
iconcache: ref textures
...
We can't just assume that the pointer we'se using as a cache key will
stay unique forever. The texture might be freed, and a later allocated
texture might have the same addres now, causing the cache to return
incorrect results.
2019-08-11 09:05:31 +02:00
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