Commit Graph

340 Commits

Author SHA1 Message Date
Matthias Clasen
e2869853dc gsk: Add a blur node
For now, this has just a fallback implementation using
the typical box filter approximation.
2017-09-04 14:28:16 -04:00
Matthias Clasen
86c0c243a0 Add rules to regenerate all shader variants
We were missing rules to build the clip variants of
the shaders.
2017-09-03 19:58:41 -04:00
Matthias Clasen
59b1206468 Avoid empty nodes another way
Make gsk_text_node_new return NULL if the extents are empty.
2017-09-03 19:35:02 -04:00
Matthias Clasen
2101f26b49 vulkan: Add more debug spew 2017-09-03 11:34:41 -04:00
Matthias Clasen
a05895e029 Record node names for debug output
This is useful for GSK_NOTE output as well.
2017-09-03 11:32:09 -04:00
Matthias Clasen
8db13c3362 gsk: Improve debug output
If we don't have node names, we can still print class names.
2017-09-03 10:32:55 -04:00
Matthias Clasen
440e534053 gsk: add a has_color boolean to text nodes
Currently, this information is not used since cairo_show_glyphs
deals with color glyphs for us. But when we get to uploading
glyphs to a texture atlas, we will need it to do the right thing.

We don't look at individual glyphs here, but just whether the
font has the has-color flag set. In practice, all glyphs in
such a font will be color glyphs, and we can avoid loading all
the glyphs this way.
2017-09-02 11:09:03 -04:00
Matthias Clasen
4975aa7920 Add a render node for text
This is just a wrapper around a PangoGlyphString + PangoFont.
Basically, the arguments that are passed to pango_renderer_draw_glyphs.
2017-09-01 13:30:03 -04:00
Daniel Boles
97b5f3d029 gskenums: Fix typo/grammar in GskRenderNodeType doc 2017-08-31 19:59:25 +01:00
Timm Bäder
c18d2872f2 GskRenderNode: Fix fallback border drawing 2017-08-29 11:48:42 +02:00
Timm Bäder
9a43881a19 gskrendernode: Fix inset shadow drawing 2017-08-28 17:50:34 +02:00
Timm Bäder
4045794801 gskrendernode: Constify some parameters 2017-08-28 17:50:34 +02:00
Lionel Landwerlin
48df19287b gsk: vulkan: fix image uploading
The memory alignment requirements are different from the image layout.
We want the rowPitch to know where to upload the lines.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>

https://bugzilla.gnome.org/show_bug.cgi?id=786485
2017-08-18 19:41:36 -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
Emmanuele Bassi
391d1a04ec Drop Autotools build
We are officially switching to Meson as the default build system for
GTK+.
2017-08-14 22:23:09 +01:00
Timm Bäder
2eaf416062 gsk: Add color shader sources to meson build files 2017-08-13 18:01:58 +02:00
Daniel Boles
0740fb5c64 gskrendernodeimpl: Fix leak of cairo_pattern_t
It was not destroyed after setting it on the cairo_context_t, as it is
in every other case.

https://bugzilla.gnome.org/show_bug.cgi?id=785793
2017-08-04 00:59:33 +01: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
Tim-Philipp Müller
95979f4d2f meson: add vulkan bits 2017-05-03 15:10:53 +01:00
Tim-Philipp Müller
37d5938561 meson: update list of sources for changes in git master 2017-05-03 15:10:53 +01:00
Timm Bäder
4fcca9945f meson: update build files 2017-05-03 15:10:52 +01:00
Emmanuele Bassi
35c26d00d7 gsk: Include the private header
Both gskprivate.c and gskvulkanrenderer.c call `gsk_ensure_resources`
but fail in clude `gskprivate.h`, where the function is declared.
2017-05-03 15:00:12 +01:00
Emmanuele Bassi
fca3f93114 gsk: Mark finalize() implementation as static 2017-04-26 17:28:14 +01:00
Emmanuele Bassi
9442ef055d gsk: Mark internal symbol as static
Nothing uses this function outside of GskVulkaneRenderPass.
2017-04-26 17:27:24 +01:00
Emmanuele Bassi
c71aeff9b2 gsk: Mark internal symbols as static
These symbols are not used anywhere outside of GskVulkanImage.
2017-04-26 17:25:24 +01:00
Emmanuele Bassi
7ae5b516ac gsk: Mark private symbol as static
The ellipsis_contains_point() function is not used anywhere else.
2017-04-26 17:25:24 +01:00
Timm Bäder
dfcde113e8 GskRoundedRect: Include private header file
So we don't have implementations without previous prototypes.
2017-04-26 11:07:40 +02:00
Timm Bäder
0105bf82c0 GskRenderNode: Fix set_scaling_filters function name
The implementation sed _filters while the prototype used _filter.
2017-04-26 11:06:55 +02:00
Timm Bäder
6c7f1d8885 GskRenderNode: add missing prototype 2017-04-26 11:06:32 +02:00
Timm Bäder
d55249c6f1 gsk: Add color shaders to resources 2017-04-01 16:16:03 +02:00
Timm Bäder
d8f78d3a32 glrenderer: Reuse the GArray for render items 2017-03-31 09:50:39 +02:00
Timm Bäder
67e7f44654 glrenderer: Add render items for child nodes 2017-03-31 09:50:39 +02:00
Timm Bäder
fbada8e758 glrenderer: Handle color nodes 2017-03-31 09:50:39 +02:00
Timm Bäder
a33e90a029 glrenderer: Store uniform locations per program 2017-03-31 09:50:39 +02:00
Daniel Boles
d33878c5fe gskrendernodeimpl: Fix documentation argument type 2017-03-27 22:16:56 +01:00
Daniel Boles
3d11edf1bc GSK: Fix a bunch of warnings from the GIR scanner
arising from conflicting argument names, missing annotations, etc.
2017-03-27 20:22:07 +01:00
Alexander Larsson
e307a35c33 gsk: Take scale factor into account when setting up the gl scissor 2017-03-20 10:53:58 +01:00
Alexander Larsson
9e12fc7853 gl renderer: Fix hidpi fallback rendering
When allocating the surface, take scale into consideration.
2017-03-20 10:53:58 +01:00
Timm Bäder
6637b20b4c GdkRenderer: Fix a compiler warning 2017-03-19 15:44:15 +01:00
Tim-Philipp Müller
37b99ed671 vulkan: fix compilation 2017-03-18 12:23:39 +00:00