Commit Graph

53 Commits

Author SHA1 Message Date
Benjamin Otte
0e1a50366a transform: Move to GSK
The renaming of the prefix makes this a large patch.
2019-03-04 23:09:02 +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
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
3dd188fe7e gl renderer: Cache blurred outset shadow nodes
Since these are particularly expensive to render and we have a pretty
big one used in every client-side decorated window.
2018-07-08 21:50:59 +02:00
Benjamin Otte
c48be6ef96 Revert "Add aligned allocator functions to GSK"
This reverts commit 8e74eb382f.

This code is not necessary. It worked around a bug in graphene where
graphene was requiring stricter alignment than glib allocators could
guarantee.
2018-06-19 20:00:53 +02:00
Руслан Ижбулатов
8e74eb382f Add aligned allocator functions to GSK
The code is mostly stolen from graphene.
Allocators support any alignment, but their implementation
only calls system aligned allocator functions if malloc()
is not aligned to 16-byte boundaries. If it is aligned,
the implementation just calls malloc() regardless of which
alignment is requested by the caller.

This can be fixed by saving the result of meson malloc()
alignment check and adding a few conditions to the implementation,
but right now GSK and GTK only need 16-byte alignment either way.
2018-06-09 14:01:03 +00:00
Benjamin Otte
a6079b9b7b gsk: Implement gsk_render_node_diff()
This includes a copy of the diff(1) algorithm used by git diff by Davide
Libenzi.

It's used for the common case ofcontainer nodes having only very few
changes for the few nodes of child widgets that changed (like a button
lighting up when hilighted or a spinning spinner).
2018-04-05 14:56:38 +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
e35132054e gl: Move shaderbuilder into gl/ subdirectory
It only handles OpenGL shaders.
2018-03-15 15:06:46 +01:00
Timm Bäder
fab9449414 build: install gsk-autocleanup.h 2018-02-06 11:26:47 +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
Matthias Clasen
3771c95c72 gsk: Move Vulkan sources to a subdirectory
Following what was already done for GL.
2018-01-06 09:36:55 -05:00
Timm Bäder
86a6131510 build: Rename a variable
Those aren't source headers...
2017-12-29 05:48:43 +01:00
Timm Bäder
d211f42091 gl renderer: Remove unused vertex shader 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
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
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
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
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
9b400134d5 gl renderer: Remove unused shaders 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
24e69bb877 gl renderer: Implement rounded clip nodes
mostly a proof of concept
2017-12-21 19:12:30 +01:00
Timm Bäder
6bce14bee2 Rework the GL renderer 2017-12-21 18:25:52 +01:00
Alexander Larsson
23845a57a9 broadway: Add GskBroadwayRenderer
This is a custom renderer for broadway windows, although at the
moment it doesn't really do anything other than the old cairo
fallbacks.
2017-11-23 10:46:47 +01:00
Benjamin Otte
ca3c23662c GskTexture => GdkTexture
We want this thing to replace GdkPixbuf, so it has to live in GDK.
2017-11-04 00:07:13 +01:00
Matthias Clasen
5577fde990 vulkan: Rename blend pipeline to texture
This is what it does, and the name blend is easily
confused with blend-mode.
2017-09-29 23:08:09 -04:00
Matthias Clasen
d61f6ff393 vulkan: Implement blend modes
This is another example for a 2-texture shader.
So far, only separable blend modes are implemented.
The implementation is not optimized, with an
if-else cascade in the shader.
2017-09-23 01:59:50 -04:00
Matthias Clasen
a75d995bd4 vulkan: Implement crossfade
This is the first shader using two textures. It almost works.
2017-09-22 22:16:10 -04:00
Matthias Clasen
cead00757d vulkan: Move glyph cache to a separate file
Otherwise things will get too messy.
2017-09-20 23:26:14 -04:00
Matthias Clasen
b0e8d8483d More work on text nodes
This commit takes several steps towards rendering text
like we want to.

The creation of the cairo surface and texture is moved
to the backend (in GskVulkanRenderer). We add a mask
shader that is used in the next text pipeline to use
the texture as a mask, like cairo_mask_surface does.
There is a separate color text pipeline that uses the
already existing blend shaders to use the texture as
a source, like cairo_paint does.

The text node api is simplified to have just a single
offset, which determines the left end of the text baseline,
like all our other text drawing APIs.
2017-09-10 14:36:26 -04:00
Patrick Griffis
a55b57caff build: Improve vulkan resource handling
This fixes the proper dependencies getting set up for generating
the shaders and only the necessary things getting rebuilt on
resources changing in gsk.
2017-09-05 15:18:56 -04:00
Matthias Clasen
7bb5b8df0b A somewhat working blur shader
This is a very direct implementation of a Gaussian blur,
without any optimizations.
2017-09-04 23:32:31 -04:00
Emmanuele Bassi
4904491b77 build: Move Vulkan shader handling to its own directory
Spooky action at a distance is not really allowed in Meson, so the rules
to generate the SPV files should go in their own directory.

Tested by: Rico Tzschichholz <ricotz@ubuntu.com>
2017-08-15 17:07:21 +01:00
Timm Bäder
7685d157bc build: Remove more wrong kwargs
declare_dependency does not take a depends: kwarg and meson 0.42.0
started warning about that.
2017-08-15 14:56:13 +02:00
Timm Bäder
2eaf416062 gsk: Add color shader sources to meson build files 2017-08-13 18:01:58 +02:00
Emmanuele Bassi
6728f45aa0 build: Ensure that Vulkan shaders are rebuilt if glslc is found
If glslc is found, rebuild the shaders from GLSL to SPIR-V; otherwise,
we're just going to use the built files we have committed in the source
repository.
2017-05-03 15:10:57 +01:00
Emmanuele Bassi
d35d82fb35 build: Rename GSK resource generator script
Maintain the naming convention, since we have similar scripts for GDK
and GTK already.
2017-05-03 15:10:57 +01:00
Emmanuele Bassi
e18d9a85ca build: Use the common linker flags in GDK and GSK
Instead of hard-coding `-Bsymbolic`.
2017-05-03 15:10:56 +01:00
Emmanuele Bassi
68039b610b build: Add compiler warnings and errors
We don't want to build buggy code.
2017-05-03 15:10:56 +01:00
Tim-Philipp Müller
e850973956 meson: build input modules
We have to work around some ordering problems here. We still
manage to keep most of the guts in modules/input/meson.build,
so it's not too ugly overall.

(The autotools build solves this with a 'make -C ../../input/modules'
inside gtk/Makefile, but that's not something we can or want to do.)
2017-05-03 15:10:56 +01:00
Tim-Philipp Müller
f67a9d58db meson: make sure gsk/gdk generated headers exist for libgtk_dep users
Add back dependencies on libgdk_dep and libsk_dep which are declared
dependencies. We removed this before because these declarations had
link_with: lines that dragged in the static libgdk.a and libgsk.a libs
which are linked into libgtk-4.so anyway and thus shouldn't be used
when linking internal exes/tools against libgtk-4. Remove the static
libs from the declared dependencies and have libgtk link those in
explicitly, so that the declared deps now just provide all the built
dependencies and include dirs and such for declared libgtk_dep users
such as the internal exes/tools, which want all the generated gsk/gdk/gtk
headers to exist before attempting to compile anything against the
gtk+ headers.
2017-05-03 15:10:54 +01:00
Tim-Philipp Müller
07ffb19c42 meson: gdk, gsk: fix install path of generated files 2017-05-03 15:10:54 +01:00
Tim-Philipp Müller
a0c207614a meson: gsk: install public headers 2017-05-03 15:10:53 +01:00
Tim-Philipp Müller
7b6b3c7786 meson: gsk: use gnome.mkenums() to generate enum types 2017-05-03 15:10:53 +01:00
Tim-Philipp Müller
fed7d22df7 meson: gsk: generate gsk.resources.xml 2017-05-03 15:10:53 +01:00