Timm Bäder
c9656e2864
gl driver: Only support one fbo per texture
2017-12-29 05:48:43 +01:00
Timm Bäder
352590cf9f
gl driver: Remove vao API
...
Unused.
2017-12-29 05:48:43 +01:00
Timm Bäder
825608af2a
gl renderer: Remove unused parameter
2017-12-29 05:48:43 +01:00
Timm Bäder
aeaab5557b
gl renderer: Only draw what we have to
2017-12-29 05:48:42 +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
9f2674077a
gl renderer: Properly flip texture in render_texture path
...
Just do this on the CPU instead.
2017-12-28 16:48:35 +01:00
Timm Bäder
a720a63fa3
gl renderer: Insert render target op in render_texture path
2017-12-28 16:48:35 +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
f044b01549
gl renderer: Don't crash if the first op is an opacity one
2017-12-21 19:12:32 +01:00
Timm Bäder
490e15021c
gl renderer: Force cross-fade nodes offscreen
2017-12-21 19:12:32 +01:00
Timm Bäder
48be2aed23
gl renderer: Use one function per op type to apply data
2017-12-21 19:12:32 +01:00
Timm Bäder
28499032da
gl renderer: Don't leak gl resources
2017-12-21 19:12:32 +01:00
Timm Bäder
ee27b17a12
gl renderer: Fix indentation mishap
2017-12-21 19:12:32 +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
18e7d777a2
gl renderer: Move declarations to the beginning of the block
2017-12-21 19:12:32 +01:00
Timm Bäder
e9be72a73e
gl renderer: Fix use of uninitialized values
2017-12-21 19:12:32 +01:00
Timm Bäder
33457b4035
gl renderer: Ensure texture sizes arent 0
...
We already ceil() the given float texture sizes here, so if they are
valid, the result should definitely be > 0. Textures with size 0 can't
be properly used, especially not as render targets, where they will
trigger an assertion failure later in a glCheckFramebuffer call.
2017-12-21 19:12:32 +01:00
Timm Bäder
49c7cf36e4
gl renderer: Fix inset and outset shadows in hidpi
2017-12-21 19:12:32 +01:00
Timm Bäder
b03f08960b
gl renderer: Fix cairo node surface size in hidpi
2017-12-21 19:12:32 +01:00
Timm Bäder
d9e135dcb5
gl renderer: Fix rounded clips in hidpi
2017-12-21 19:12:32 +01:00
Timm Bäder
3411e648b4
gl renderer: Handle borders in hidpi better
2017-12-21 19:12:32 +01:00
Timm Bäder
64400e82b5
gl renderer: Default to 0px clip and border radius
...
Finally fix the division by 0 in the clip code.
2017-12-21 19:12:32 +01:00
Timm Bäder
703c4cf003
gl renderer: Ignore render ops before we have a valid program
2017-12-21 19:12:32 +01:00
Timm Bäder
2d3e87da46
gl renderer: Try to fix border rendering
2017-12-21 19:12:32 +01:00
Timm Bäder
a59f380d31
gl renderer: Use one function per node-type
...
So a profiler can actually tell me what's slow and not just point at
_add_render_ops in all cases.
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
476450b93e
gl renderer: Ignore shadow color matrix nodes...
...
... if the color matrix nodes don't touch the child alpha.
2017-12-21 19:12:32 +01:00
Timm Bäder
98ba28b5d7
gl renderer: Add a helper function
...
We'll use this for the common case of a color matrix node inside a
shadow node.
2017-12-21 19:12:32 +01:00
Timm Bäder
49785974cf
gl renderer: Don't zero initialize render ops GArray
2017-12-21 19:12:32 +01:00
Timm Bäder
7cc868910b
gl renderer: Avoid crashing tooltips
2017-12-21 19:12:31 +01:00
Timm Bäder
39a241b763
gl renderer: Sort border sides by color
2017-12-21 19:12:31 +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
f978bf057f
gl renderer: Avoid using a new modelview for shadow nodes
...
We can just move the vertex data directly.
2017-12-21 19:12:31 +01:00
Timm Bäder
7ad8f211c6
gl renderer: Default to GL_LINEAR scaling filters
2017-12-21 19:12:31 +01:00
Timm Bäder
5cdd46e38e
gl renderer: Remove superfluous modelview matrix changes
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
b33d85b594
gl renderer: Avoid consecutive opacity ops
2017-12-21 19:12:31 +01:00
Timm Bäder
a0e033b2cd
gl renderer: Define debug structs inline
2017-12-21 19:12:31 +01:00
Timm Bäder
5d0c279351
gl renderer: Add more detailed render op output
2017-12-21 19:12:31 +01:00
Timm Bäder
7831d9a463
gl renderer: Only draw blurred shadow nodes once
2017-12-21 19:12:31 +01:00
Timm Bäder
7dc6a46cff
gl renderer: Remove consecutive clip ops
2017-12-21 19:12:31 +01:00
Timm Bäder
bb69d64a0f
gl renderer: Rename a macro
2017-12-21 19:12:31 +01:00
Timm Bäder
8463040ad1
gl renderer: Fix debugging output
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
8089cde977
gl renderer: Don't render unblurred text shadows to a texture
...
We can do the same thing by simply drawing the text in the given shadow
color.
2017-12-21 19:12:31 +01:00
Timm Bäder
d5a759652f
gl renderer: Split out text rendering function
...
We'll use that for text shadow 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
c524ac7bb5
gl renderer: Split out a utility function
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
ff1cacb54a
gl renderer: Remove some unused members
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
2865ab84a9
gl renderer: Don't draw texture nodes to a framebuffer
...
We don't need to create a texture from a texture node. We can simply use
its texture instead and draw it however we want.
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
b56a7afd19
gl renderer: Factor out a helper function for offscreen drawing
2017-12-21 19:12:30 +01:00
Timm Bäder
95051e13c3
gl ops: Remove dead code
...
This is already checked further up in that function
2017-12-21 19:12:30 +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
fa564e1f93
gl renderer: Remove unused VAO
2017-12-21 19:12:30 +01:00
Timm Bäder
d5eeb9d6f0
gl renderer: Stop collecting VAOs in clear_tree
...
We don't use that part of the gl driver anymore.
2017-12-21 19:12:30 +01:00
Timm Bäder
6606c1f682
gl renderer: Only check for color glyphs once per text node
...
It does not depend on the glyph, so no need to do it once for every
glyph.
2017-12-21 19:12:30 +01:00
Timm Bäder
5615fd26c2
gl renderer: Implement cairo nodes again
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
Timm Bäder
823369f275
gsk: Move all gskgl* files into gl/
2017-12-21 19:12:30 +01:00