Benjamin Otte
6594ccf716
gsk: Export gsk_gl_renderer_new()
2019-05-05 07:18:39 +02:00
Timm Bäder
c848b9014b
gl renderer: Add simple blend node implementation
2019-04-28 07:58:31 +02:00
Alexander Larsson
32edf29c0a
GskGLRenderer: Add debug groups
...
This adds debug groups in various places, including the debug
nodes if those are in use. This makes the traces in tools like
renderdoc much easier to read.
2019-04-25 11:36:21 +02:00
Timm Bäder
91bbe6ef95
gl renderer: Sync gpu and cpu default alpha value
...
Otherwise we might end up not passing the new value to the GPU.
2019-04-24 13:29:45 +02:00
Benjamin Otte
3cc84d2860
transform: Make category public API
...
Also rename it from GskMatrixCategory to GskTransformCategory.
2019-03-04 23:15:24 +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
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
2b95a5daee
gl renderer: Remove blend shader
...
It's unused.
2018-12-02 16:04:40 +01:00
Timm Bäder
692ed4f994
gl renderer: Refactor render op builder
2018-12-02 14:17:18 +01:00
Timm Bäder
74dd05b45e
gl renderer: add render ops for dumping the framebuffer
...
So offscreen rendering can be properly debugged.
2018-12-02 13:25:43 +01:00
Timm Bäder
5907ff694f
gl renderer: Render non-trivial transforms to a texture
...
This way we can e.g. render rotated clips, borders, etc.
2018-11-29 08:50:18 +01:00
Timm Bäder
12378f0afa
gl renderer: Expand matrix metadata extraction
...
Instead of getting the translation x/y everytime we use the modelview,
get it once, when extracting the metadata. Do the same with the scale.
And save if the matrix is "simple" at all, i.e. if it only consists of a
translation and/or scale. This will be helpful later when we start
drawing transformed nodes on textures.
2018-11-29 08:23:42 +01:00
Timm Bäder
ef751bc809
gl renderer: Use stack to keep track of modelview matrix
...
So we can avoid calculating metadata for matrices all the time.
2018-11-27 05:39:27 +01:00
Timm Bäder
d15df65a9d
gl renderer: Save some matrix multiplications
...
We do this for every single node, which is a little costly, especially
since the common case for the modelview matrix these days is a simple
translation. So, check whether the new modelview matrix is only a
translation matrix and if so, don't do a full matrix multiplication per
node.
2018-10-11 12:27:56 +02:00
Timm Bäder
d7af16c8e4
gl renderer: Render everyhing according to MV scale
...
And not the surface's scale factor. This way the magnifier works.
2018-04-11 15:31:22 +02:00
Timm Bäder
f6330846c9
gl renderer: Remover unused mask uniform
2018-03-30 23:15:04 +02:00
Timm Bäder
eaf899061a
gl renderer: Remove shadow program
...
Drawing shadows is the same task as drawing text in our case and these
two shaders have been the same thing for quite a while.
2018-03-15 18:12:00 +01:00
Timm Bäder
0a7880110e
gl renderer: Fix clipped borders
...
Stop abusing the clip rect for borders.
2018-03-15 18:11:57 +01:00
Timm Bäder
4946810960
gl renderer: Render unblurred outset shadows differently
...
We don't need to draw anything to a texure for those.
2018-01-15 10:56:43 +01:00
Timm Bäder
2bc10fa365
gl renderer: draw all outset shadows
...
Instead of falling back to cairo for most of them.
2017-12-29 05:48:40 +01:00
Timm Bäder
7a2d30323e
gl renderer: try doing outset box shadows
...
Still fall back in cases we can't handle that way.
2017-12-21 19:12:33 +01:00
Timm Bäder
a83037c440
gl renderer: Implement cross fade nodes
2017-12-21 19:12:32 +01:00
Timm Bäder
075e6ac266
gl renderer: Fix shadow nodes if the child is a container
2017-12-21 19:12:32 +01:00
Timm Bäder
ab53ee7377
gl renderer: Don't render opacity nodes offscreen
...
We already drag a u_alpha uniform around in every shader, so use that
one.
2017-12-21 19:12:32 +01:00
Timm Bäder
c9af94f6db
gl renderer: Keep track of border program state
2017-12-21 19:12:31 +01:00
Timm Bäder
1fce25c7af
gl renderer: Remove unused struct member
2017-12-21 19:12:31 +01:00
Timm Bäder
9479bb6bfc
gl renderer: Keep track of color matrix op state
2017-12-21 19:12:31 +01:00
Timm Bäder
3b7cfd068b
gl renderer: Implement simple border nodes
2017-12-21 19:12:31 +01:00
Timm Bäder
e95b356465
gl renderer: Implement simple shadow nodes
2017-12-21 19:12:31 +01:00
Timm Bäder
47c4bf5be0
gl renderer: Implement unblurred outset shadows
2017-12-21 19:12:31 +01:00
Timm Bäder
5c7838e168
gl renderer: Rework program creation
...
Make sure all uniform names have to match between the shader names and
the _location integers we save in every Program struct.
2017-12-21 19:12:31 +01:00
Timm Bäder
388157b995
gl renderer: Implement unblurred inset shadows
2017-12-21 19:12:31 +01:00
Timm Bäder
6a1a70c677
gl renderer: Implement blur nodes
2017-12-21 19:12:31 +01:00
Timm Bäder
19700fccb2
gl renderer: Keep track of current program color value
2017-12-21 19:12:31 +01:00
Timm Bäder
e3264d5fd3
gl renderer: Implement color matrix nodes again
2017-12-21 19:12:31 +01:00
Timm Bäder
cb9c4e362c
gl render ops: Rename a member
2017-12-21 19:12:31 +01:00
Timm Bäder
832920c6ba
gl renderer: Optimize text drawing
...
Text nodes will almost always end up using the exact same texture and
the same program. So, in that case we can simply add vertex data for all
the characters we need to draw and use just one draw call.
2017-12-21 19:12:30 +01:00
Timm Bäder
a1d3e77347
gl renderer: Move render ops into separate file
2017-12-21 19:12:30 +01:00