Timm Bäder
9105de9170
gl renderer: Cache rendered fallback nodes
2019-03-06 06:31:25 +01:00
Timm Bäder
eeed55d45c
gl renderer: Mark pointer textures as used
...
Otherwise we remove them, causing additional texture uploads.
2019-03-06 06:31:25 +01:00
Benjamin Otte
bd113aa85c
transform: Redo querying API
...
Make the API expect a tranform of the proper category instead of
doing the check ourselves and returning TRUE/FALSE.
The benefit is that the mai use case is switch (transform->category)
statements and in those we know the category and don't need to check
TRUE/FALSE.
Using the wrong matrix will now cause a g_warning().
2019-03-04 23:41:51 +01:00
Benjamin Otte
3cc84d2860
transform: Make category public API
...
Also rename it from GskMatrixCategory to GskTransformCategory.
2019-03-04 23:15:24 +01:00
Benjamin Otte
3a3c2d14ab
rendernode: Make the transform node take a GskTransform
...
This is an attempt to push GskTransform deeper into the stack.
2019-03-04 23:15:07 +01:00
Timm Bäder
7931ab5f33
gl renderer: Change shadow cache eviction strategy
...
Since we can do partial redraws, dropping every shadow that's been
unused for one frame happens too fast. This is also a problem when a
shadow gets drawn on a texture for a few frames.
2019-02-28 10:33:18 +01:00
Timm Bäder
416a4cf5ea
gl renderer: Ignore nodes with nan bounds
...
This can happen for certain transform nodes. The transform node's
child's bounds are fine, but the transform node bounds are all nan.
Just ignore those bounds since we can't meaningfully render them anyway.
2019-02-28 07:22:34 +01:00
Timm Bäder
5577e30ad4
gl renderer: Add more nodes that support transforms
2019-02-28 07:22:34 +01:00
Timm Bäder
e836c575ce
gl renderer: Remove GskRoundedRect initializaion
2019-02-25 08:46:27 +01:00
Timm Bäder
47fb1ec4c4
gl renderer: Partially implement rounded rect intersection
...
Some rounded rect intersections can actually be done and even expressed
as a single rounded rectangle.
2019-02-25 08:46:27 +01:00
Timm Bäder
f0624266dc
gl renderer: Add debug function to dump render node
2019-02-25 08:46:27 +01:00
Timm Bäder
58c2bea959
gl renderer: Stop determining the matrix category ourselves
...
Use the category we get from transform nodes and add ops_ API to supply
one when we set a graphene_matrix_t directly.
2019-02-25 08:37:06 +01:00
Timm Bäder
f9041230c6
gl renderer: Round size up when rendering to a texture
...
Both the clip we use and the viewport we set should contain the entire
texture size and not potentially clip the last pixel.
2019-02-23 04:50:25 +01:00
Timm Bäder
da0bd697b8
gl renderer: Use the matrix node category
2019-02-22 19:08:43 +01:00
Benjamin Otte
6a4bf2b993
gsk: Remove offset nodes
...
They were a neat idea while they lasted. But now, it's time for
categorized transform nodes, where matrices with
GSK_MATRIX_CATEGORY_2D_TRANSLATE are the exact replacement.
Renderers have not been adapted for this purpose, so they (continue to)
run slow paths.
2019-02-21 19:47:28 +01:00
Timm Bäder
a872c41f79
glglyphcache: Fix dropping caches unnecessarily
...
The first set of glyphs is created with a timestamp of 1. Later we
subtract the glyph timestamp from the cache timestamp, meaning we end up
with numbers ending in 9, e.g. 59. Now unfortunately !(60 <= 59), so we
do not end up incrasing the old_pixels count of the cache. Later we then
call lookup() and DEcrease the old_pixels count, which makes the
unsigned int wrap and cause a huge old_pixels value, which causes us to
drop the cache.
2019-02-10 10:31:27 +01:00
Timm Bäder
ea554580c7
glglyphcache: Remove surface member from dirty glyph
...
We don't use it after we've rendered to it, just its size and data.
2019-02-10 10:31:27 +01:00
Benjamin Otte
359bc7695c
build: Reintroduce warning flags from autotools
...
Some of the flags got lost in the meson transition or were demoted from
error flags to warning flags.
This commit reintroduces them.
It also includes fixes for the code that had warnings with those flags.
The big one being -Wshadow.
2019-01-22 04:33:12 +01:00
Timm Bäder
8e0cbc1c3d
gl renderer: Support (not) resetting the opacity for offscreen nodes
...
We usually want to do that, but it's wrong for e.g. crossfade nodes.
2019-01-18 19:43:54 +01:00
Timm Bäder
e14fe222e8
gl renderer: Don't add clip ops if the clip didn't change
2019-01-18 19:40:49 +01:00
Timm Bäder
59bf76dce1
gl renderer: Force blur shadow node children offscreen
...
This broke the overlay blur demoe when resizing the window to a size
that would completely move the image below a button, causing the
GtkSnapshot code to remove the clip node below the blur node.
2019-01-13 08:41:37 +01:00
Timm Bäder
d55fc8b7b1
gl renderer: Dont't try to draw glyphs at scale 0
...
Fixes #1475
2019-01-10 17:14:48 +01:00
Timm Bäder
e72d0a9118
gl glyphcache: Only support one dirty glyph per atlas
2019-01-10 16:49:19 +01:00
Timm Bäder
fb7d033953
gl renderer: Remove debug code
2019-01-10 16:49:19 +01:00
Timm Bäder
cfa440bbae
gl renderer: Fix hidpi transform nodes
2019-01-10 16:49:19 +01:00
Timm Bäder
b0a8b7da63
gl renderer: Only compile the vertex shader once
...
All our programs use the same vertex shader, so don't compile it over
and over again. This improves startup times by at least 0.001%, I swear.
2019-01-10 16:49:19 +01:00
Timm Bäder
b2ff6e91cd
gl renderer: Don't forget the offset when rendering blur nodes
2019-01-10 16:49:19 +01:00
Timm Bäder
1d3aa9207c
gl renderer: Add a clip stack
...
So we can check that the currently set clip is the first one and now
intersect with it. This first clip is always the entire viewport or the
entire render_area and we don't want to end up drawing things to a
texture because of it.
2018-12-31 12:44:02 +01:00
Timm Bäder
3ce45508e1
gl renderer: Track border width state separately
2018-12-07 16:36:10 +01:00
Timm Bäder
57efdcfbbe
gl renderer: Ignore subsequent render target ops
2018-12-07 16:36:10 +01:00
Timm Bäder
df817bd118
gl renderer: Ignore viewport ops to the same viewport
2018-12-07 16:36:10 +01:00
Timm Bäder
4b3a94f382
gl renderer: Fix remaining TODO about offset nodes
...
All of the nodes should now support offsets.
2018-12-04 06:30:47 +01:00
Timm Bäder
d67dacedba
gl renderer: transform nodes: offset
2018-12-04 06:30:47 +01:00
Timm Bäder
e1feb1b712
gl renderer: Clip nodes: offset
2018-12-04 06:30:47 +01:00
Timm Bäder
e8670c89ae
gl renderer: Linear gradients: offset
2018-12-04 06:30:47 +01:00
Timm Bäder
b4f918904c
gl renderer: Outset shadow nodes: offset
2018-12-04 06:30:47 +01:00
Timm Bäder
aead150ce2
gl renderer: Care about offset when rendering border nodes
2018-12-04 06:30:47 +01:00
Timm Bäder
fd47e57e4b
gl renderer: care about offset when rendering shadow nodes
2018-12-04 06:30:47 +01:00
Timm Bäder
2b95a5daee
gl renderer: Remove blend shader
...
It's unused.
2018-12-02 16:04:40 +01:00
Timm Bäder
0681c5d5bc
gl renderer: Reset opacity when rendering to a texture
...
The opacity will already be applied when rendering the final texture.
2018-12-02 16:03:08 +01:00
Timm Bäder
b19926c079
gl renderer: Add function to draw debug rectangle
2018-12-02 14:31:57 +01:00
Timm Bäder
692ed4f994
gl renderer: Refactor render op builder
2018-12-02 14:17:18 +01:00
Timm Bäder
ad759307f8
gl renderer: Add more node types to print_render_node_tree
...
debugging ++
2018-12-02 13:39:55 +01:00
Timm Bäder
58a4ae94e9
gl renderer: Use ops_transform_bounds_modelview in more places
2018-12-02 13:25:43 +01:00
Timm Bäder
9df9087a13
gl renderer: Add NodeSample
...
As a quick way of checking what a particular sample of nodes (e.g. all
offset node children) are made up of.
2018-12-02 13:25:43 +01:00
Timm Bäder
71512cf9ad
gl renderer: Move geometry calculation further down
...
We don't need it above, so move it to where it belongs.
2018-12-02 13:25:43 +01:00
Timm Bäder
79cc8fb261
gl renderer: Apply offset with scale
2018-12-02 13:25:43 +01:00
Timm Bäder
2831dbb110
gl renderer: Refactor add_offscreen_ops
...
Use a graphene_rect_t for the node bounds instead of 4 floats.
This makes it simpler to pass the size in without the offset applied.
2018-12-02 13:25:43 +01:00
Timm Bäder
933acb3682
gl renderer: Add offscreen ops without offset applied
...
When doing color matrix nodes. This fixes color matrix node with scale =
2.
2018-12-02 13:25:43 +01:00
Timm Bäder
574ebafa46
gl renderer: Reset offset when rendering offscreen
...
We want to apply the offset to the rendered texture, not to the
offscreen-rendered content.
2018-12-02 13:25:43 +01:00