Commit Graph

308 Commits

Author SHA1 Message Date
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
Timm Bäder
242368bdf6 GtkShaderBuilder Fix copy/paste error in precondition
gtk_shader_builder_add_define should check both define_name and
define_value for not-NULL and not-empty, but the second precondition
check checks define_name again for not-empty-ness.
2017-03-17 18:35:43 +01:00
Alexander Larsson
1fe4b13871 Allow custom renderer for the inspector
If you set GTK_INSPECTOR_RENDERER to the same type of
values that GSK_RENDERER takes this can change the renderer
used for the inspector. This is useful if you're debugging
one renderer and don't want to affect the inspector.
2017-03-17 16:12:45 +01:00
Benjamin Otte
ee9828d49c vulkan: Fix copy/paste error 2017-01-18 16:46:04 +01:00
Benjamin Otte
12637195de vulkan: Add compiled shaders
I forgot to include them when adding the shaders.
2017-01-18 16:42:01 +01:00
Benjamin Otte
cde933ebd9 vulkan: Compute right size for outset shadow
We were emitting the box and not the shadow box as the rectangle. So we
didn't draw any shadows. Oops.
2017-01-18 16:39:27 +01:00
Benjamin Otte
bd24ca5b18 vulkan: Add support for unblurred box-shadow 2017-01-18 04:13:56 +01:00
Benjamin Otte
84c1204853 rendernode: Add getters for box-shadow nodes 2017-01-18 04:13:56 +01:00
Benjamin Otte
01d16524da vulkan: Add fallback message for node-as-texture
This is mainly to motivate me to implement it.
2017-01-17 06:38:36 +01:00
Benjamin Otte
6bec7aae89 vulkan: Generate clip shaders from same source
Instead of having 3 different shaders for the different clipping
versions, just have one shader and use a preprocessor define to use
different clip functions.

That preprocessor define is set in the Makefile.

Also use foo.frag and foo.vert as the file extensions instead of using
foo.frag.glsl and foo.vert.glsl, as that's what glslc suggests as
extension.
2017-01-17 06:17:55 +01:00
Benjamin Otte
3768c676c6 vulkan: Add clip.vert.glsl
Implement clipping the same way as in the last commit for the
fragment shaders.
2017-01-17 06:17:55 +01:00
Benjamin Otte
cf65443fb3 vulkan: Add a clip.frag.glsl include
This include is supposed to handle clipping for the different clipping
methods.

So far, we only use it in the rounded rect cases.
2017-01-17 06:17:55 +01:00
Benjamin Otte
6a60e335cd vulkan: Add push constants to fragment shader
That way we don't need to move the clip rounded rect manually through
the vertex shader into the fragment shader but can just look at the push
constants.

Simplifies shaders a lot.
2017-01-17 06:17:55 +01:00
Benjamin Otte
c7d899c535 vulkan: Move push constants into their own header
This is the first step towards easing maintenance of the Vulkan shaders
by moving common code into headers.
2017-01-17 06:17:55 +01:00
Benjamin Otte
10bc71a5e6 build: List resource files explicitly
This way, we ensure that files that are built during make always get
properly listed. And we ensure that creating the resources actually
depends on them.
2017-01-11 18:33:09 +01:00
Benjamin Otte
b186bce7ff vulkan: Add shader for border rendering 2017-01-11 18:33:09 +01:00
Alexander Larsson
2f453cc57e gsk_rounded_rect_init_copy: Don't normalize
This was showing up quite high on the profiles, and there is
no real reason for copy to normalize, as the source is a
GskRoundedRect which should be normalized already unless
you did something very strange (and then you should have normalized
manually).
2017-01-11 09:23:37 +01:00
Chun-wei Fan
ea58ebe76d Visual Studio builds: Move project files to win32/
It was suggested that the project files to be moved to win32/, so that we can
have one less layer of directories we need to go down into to reach the project files.
2017-01-09 15:38:48 +08:00
Benjamin Otte
e4d0459d52 vulkan: Reallocate descriptor sets
Because wee now reset the descriptor pool, we also need to reallocate
the descriptor sets.
2017-01-06 18:10:12 +01:00
Benjamin Otte
5a6ead8760 vulkan: Keep vertex buffer around until cleanup
Don't just free it while the command buffer using it is still pending.
2017-01-06 17:16:38 +01:00
Benjamin Otte
639b5ffb9b vulkan: Reset descriptor pool
We don't want the pool to reference images we're gonna destroy. Drivers
don't like that at all.
2017-01-06 16:31:53 +01:00
Benjamin Otte
833607c19e gsk: Don't use wildcards
Explicitly list all the shaders, so new ones get picked up properly and
cause the resource file to be regenerated (due to Makefile.am changing).
2017-01-06 16:31:53 +01:00
Benjamin Otte
078902e8b0 gsk: Have variables for resources
Instead of relying on --generate-dependencies and the resource file,
actually list the resources in Make variables.

Fixes make not building new shaders because they're not inside the
resource file.
2017-01-06 16:31:53 +01:00
Georges Basile Stavracas Neto
33a6347766 vulkanrender: Create descriptor pools with correct descriptor number 2017-01-06 02:46:27 -02:00
Georges Basile Stavracas Neto
67894ace64 vulkanpushconstants: Don't report invalid ranges
Vulkan doesn't accept empty ranges, so simply don't report
them.
2017-01-04 18:40:42 +01:00
Benjamin Otte
f05f0377df vulkan: Modernize blend pipeline
- Rename from blit => blend
- Use instances
- Add clip versions
2017-01-04 13:22:57 +01:00
Benjamin Otte
b993acfe2c gsk: Add GskRepeatNode
Also add gtk_snapshot_push_repeat() and use that to draw backgrounds.

With that change, CSS background snapshots are created without Cairo
nodes.
2017-01-01 19:53:36 +01:00
Benjamin Otte
2571036c07 gsk: Turn GskTexture into a GObject 2017-01-01 19:53:36 +01:00
Benjamin Otte
2fe01a5b57 vulkan: Optimize getting textures
When we already have a texture or know we need to upload, just do that
instead of rendering to Cairo.
2017-01-01 19:53:36 +01:00
Benjamin Otte
e18d5ca835 vulkan: Add support for color matrix nodes
@keyframes weee {
    100% { filter: hue-rotate(1turn); }
}

.background {
    animation: linear infinite 3s weee;
}
2016-12-31 14:37:20 +01:00
Benjamin Otte
1aa0f79e8b vulkan: Make the effect renderer take matrix + offset
This is in preparation for the new color matrix node.

I don't think keeping support for a separate opacity shader is worth it.
2016-12-31 14:37:20 +01:00
Benjamin Otte
7540702cf0 gsk: Add GskColorMatrixNode
This node essentially implements the feColorMatrix SVG filter. I got the
idea yesterday after looking at the opacity implementation.

It can be used for opacity (not sure if we want to) and to implement a
bunch of the CSS filters.
2016-12-31 02:49:47 +01:00
Benjamin Otte
91741f6b63 vulkan: Handle opacity nodes
Well, "handle" them actually. We still draw the node's child using
Cairo, but we apply the opacity manually now.
2016-12-31 02:49:47 +01:00