Commit Graph

53270 Commits

Author SHA1 Message Date
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
Timm Bäder
358c139a43 gl renderer: Rework once more
Last time, I swear.
2017-12-21 19:12:30 +01:00
Timm Bäder
dd1a9745db gl renderer: Don't initialize modelview matrix twice 2017-12-21 19:12:30 +01:00
Timm Bäder
59a7584386 gl renderer: Group render node types by render item creation 2017-12-21 19:12:30 +01:00
Timm Bäder
f4304336ea gl renderer: Don't pass MVP to shaders
We already pass both modelview and projection matrix individually.
2017-12-21 19:12:30 +01:00
Timm Bäder
4cf2a482ea gl: Add glyph cache
Based on the one used by the vulkan renderer
2017-12-21 19:12:30 +01:00
Timm Bäder
3e23f6c22b gl renderer: Remove unused member 2017-12-21 19:12:30 +01:00
Timm Bäder
9b400134d5 gl renderer: Remove unused shaders 2017-12-21 19:12:30 +01:00
Timm Bäder
e05b0ae9a4 test-render-nodes: Add transformed clip nodes test 2017-12-21 19:12:30 +01:00
Timm Bäder
7a739e80ef showrendernode: Resize window to a reasonable size instead 2017-12-21 19:12:30 +01:00
Timm Bäder
33aa61ef2c gl renderer: Save clip in every node 2017-12-21 19:12:30 +01:00
Timm Bäder
1f5fd4d564 gl renderer: Don't create framebuffer for texture opacity children
Slowly a pattern emerges...
2017-12-21 19:12:30 +01:00
Timm Bäder
24e69bb877 gl renderer: Implement rounded clip nodes
mostly a proof of concept
2017-12-21 19:12:30 +01:00
Timm Bäder
cd730ccff5 gl renderer: save on some frame buffers
If the child of a color matrix node is a texture, we can directly use
that instead of drawing it to a texture first and then using that
texture.
2017-12-21 19:12:30 +01:00
Timm Bäder
1d1c6a98ce GskGLDriver: Add profiler
Count the newly created textures, the reused ones and the uploads from
cairo surfaces per frame.
2017-12-21 19:12:30 +01:00
Timm Bäder
ddb77d6c9b GskGLDriver: Use float for texture size in create_texture
Render nodes can end up with bounds < 1 since they are floats, and the
implicit cast to int ends up creating a texture with 0 width or height.
Use ceil() instead in create_texture so we don't have to do that on the
caller side everywhere.
2017-12-21 18:25:52 +01:00
Timm Bäder
4aa3f51016 test-render-nodes: Add color matrix test 2017-12-21 18:25:52 +01:00
Timm Bäder
8c8583d04f test-render-nodes: Print a warning if we didn't generate anything 2017-12-21 18:25:52 +01:00
Timm Bäder
04742f320e build: Remove unused variable 2017-12-21 18:25:52 +01:00
Timm Bäder
851a5d48c3 add tests/showrendernode
A .node file viewer.
2017-12-21 18:25:52 +01:00
Timm Bäder
6bce14bee2 Rework the GL renderer 2017-12-21 18:25:52 +01:00
Timm Bäder
5fa5008ee9 gl renderer: Remove some unused code 2017-12-21 18:25:52 +01:00
Timm Bäder
fe7db31663 gl driver: Make some members const 2017-12-21 18:25:52 +01:00
Timm Bäder
b488329104 GskRenderer: Remove viewport property 2017-12-21 18:25:52 +01:00
Timm Bäder
19871cfd68 snapshot: Add & use API for linear gradient nodes
This way, we can also clip the created node bounds to the current clip
of the GtkSnapshot. This works as long as we don't modify the start and
end points, and happens all the time while rendering.
2017-12-21 18:25:52 +01:00
Timm Bäder
d9f1620b2f snapshot: Directly clip color nodes
Clipping a color node is trivial so we do it here directly since that
might later save the entire clip node as well as freeing the fragment
shaders from coloring lots of pixels that will be clipped away.
2017-12-21 18:25:52 +01:00
Timm Bäder
8107b1a2dd snapshot: Fix typo 2017-12-21 18:25:51 +01:00
Timm Bäder
964c6f7d58 x11: Fix wrong condition when unsetting transient-for
Setting a new transient-for parent is only possible if the given parent
window is valid, not when it is NULL or valid.
2017-12-21 18:25:51 +01:00
Matthias Clasen
1c3f343baf Remove font-name leftovers
There were still a few places where the font-name
property was used internally.
2017-12-21 12:18:53 -05:00
Matthias Clasen
559a2bf033 Add a missing include 2017-12-21 12:18:10 -05:00
Matthias Clasen
6ff3222cbd font button: Drop the font-name property
We already have the GtkFontChooser::font property
which serves the same purpose, so get rid of the
duplication.
2017-12-21 11:10:44 -05:00
Matthias Clasen
9620e1e97f tests: Stop using gtk_font_button_get_font_name
It is going away.
2017-12-21 11:10:13 -05:00
Matthias Clasen
8581345acc Remove debug spew 2017-12-21 08:04:26 -05:00
Matthias Clasen
495d00e925 Fix a mis-merge 2017-12-20 10:36:25 -05:00