summaryrefslogtreecommitdiff
path: root/gsk
diff options
context:
space:
mode:
Diffstat (limited to 'gsk')
-rw-r--r--gsk/gskrendernodeimpl.c6
-rw-r--r--gsk/gskrendernodeparser.c17
-rw-r--r--gsk/vulkan/gskvulkanclip.c2
-rw-r--r--gsk/vulkan/gskvulkanrenderpass.c2
-rw-r--r--gsk/vulkan/resources/meson.build16
5 files changed, 26 insertions, 17 deletions
diff --git a/gsk/gskrendernodeimpl.c b/gsk/gskrendernodeimpl.c
index 90ef6fd13f..c60bd5b00f 100644
--- a/gsk/gskrendernodeimpl.c
+++ b/gsk/gskrendernodeimpl.c
@@ -4413,6 +4413,11 @@ gsk_shadow_node_draw (GskRenderNode *node,
pattern = cairo_pop_group (cr);
cairo_restore (cr);
+ cairo_save (cr);
+ /* clip so the blur area stays small */
+ gsk_cairo_rectangle (cr, &node->bounds);
+ cairo_clip (cr);
+
for (i = 0; i < self->n_shadows; i++)
{
GskShadow *shadow = &self->shadows[i];
@@ -4434,6 +4439,7 @@ gsk_shadow_node_draw (GskRenderNode *node,
cairo_set_source (cr, pattern);
cairo_paint (cr);
+ cairo_restore (cr);
cairo_pattern_destroy (pattern);
}
diff --git a/gsk/gskrendernodeparser.c b/gsk/gskrendernodeparser.c
index 5c29ce0918..c8ffad4bd1 100644
--- a/gsk/gskrendernodeparser.c
+++ b/gsk/gskrendernodeparser.c
@@ -1081,20 +1081,21 @@ parse_declarations (GtkCssParser *parser,
{
if (gtk_css_parser_try_ident (parser, declarations[i].name))
{
+ if (parsed & (1 << i))
+ {
+ gtk_css_parser_warn_syntax (parser, "Variable \"%s\" defined multiple times", declarations[i].name);
+ /* Unset, just to be sure */
+ parsed &= ~(1 << i);
+ if (declarations[i].clear_func)
+ declarations[i].clear_func (declarations[i].result);
+ }
+
if (!gtk_css_parser_try_token (parser, GTK_CSS_TOKEN_COLON))
{
gtk_css_parser_error_syntax (parser, "Expected ':' after variable declaration");
}
else
{
- if (parsed & (1 << i))
- {
- gtk_css_parser_warn_syntax (parser, "Variable \"%s\" defined multiple times", declarations[i].name);
- /* Unset, just to be sure */
- parsed &= ~(1 << i);
- if (declarations[i].clear_func)
- declarations[i].clear_func (declarations[i].result);
- }
if (!declarations[i].parse_func (parser, context, declarations[i].result))
{
/* nothing to do */
diff --git a/gsk/vulkan/gskvulkanclip.c b/gsk/vulkan/gskvulkanclip.c
index c157b4aab6..7f54ad2899 100644
--- a/gsk/vulkan/gskvulkanclip.c
+++ b/gsk/vulkan/gskvulkanclip.c
@@ -106,7 +106,7 @@ gsk_vulkan_clip_intersect_rounded_rect (GskVulkanClip *dest,
break;
case GSK_VULKAN_CLIP_NONE:
- dest->type = gsk_rounded_rect_is_circular (&dest->rect) ? GSK_VULKAN_CLIP_ROUNDED_CIRCULAR : GSK_VULKAN_CLIP_ROUNDED;
+ dest->type = gsk_rounded_rect_is_circular (rounded) ? GSK_VULKAN_CLIP_ROUNDED_CIRCULAR : GSK_VULKAN_CLIP_ROUNDED;
gsk_rounded_rect_init_copy (&dest->rect, rounded);
break;
diff --git a/gsk/vulkan/gskvulkanrenderpass.c b/gsk/vulkan/gskvulkanrenderpass.c
index c23aa0ba7b..f364b7f4c1 100644
--- a/gsk/vulkan/gskvulkanrenderpass.c
+++ b/gsk/vulkan/gskvulkanrenderpass.c
@@ -157,7 +157,7 @@ gsk_vulkan_render_pass_new (GdkVulkanContext *context,
graphene_matrix_init_ortho (&self->p,
viewport->origin.x, viewport->origin.x + viewport->size.width,
viewport->origin.y, viewport->origin.y + viewport->size.height,
- ORTHO_NEAR_PLANE,
+ 2 * ORTHO_NEAR_PLANE - ORTHO_FAR_PLANE,
ORTHO_FAR_PLANE);
if (signal_semaphore != VK_NULL_HANDLE) // this is a dependent pass
diff --git a/gsk/vulkan/resources/meson.build b/gsk/vulkan/resources/meson.build
index 3486a8868b..86e98acb9e 100644
--- a/gsk/vulkan/resources/meson.build
+++ b/gsk/vulkan/resources/meson.build
@@ -1,10 +1,9 @@
-# FIXME: what's up with these?
-#gsk_private_vulkan_include_shaders = [
-# 'clip.frag.glsl',
-# 'clip.vert.glsl',
-# 'constants.glsl',
-# 'rounded-rect.glsl',
-#]
+gsk_private_vulkan_include_shaders = [
+ 'clip.frag.glsl',
+ 'clip.vert.glsl',
+ 'constants.glsl',
+ 'rounded-rect.glsl',
+]
gsk_private_vulkan_fragment_shaders = [
'blendmode.frag',
@@ -51,6 +50,7 @@ foreach shader: gsk_private_vulkan_shaders
compiled_shader = custom_target(spv_shader,
input: shader,
output: spv_shader,
+ depend_files: gsk_private_vulkan_include_shaders,
command: [
glslc,
stage_arg,
@@ -61,6 +61,7 @@ foreach shader: gsk_private_vulkan_shaders
compiled_clip_shader = custom_target(clip_spv_shader,
input: shader,
output: clip_spv_shader,
+ depend_files: gsk_private_vulkan_include_shaders,
command: [
glslc,
stage_arg,
@@ -71,6 +72,7 @@ foreach shader: gsk_private_vulkan_shaders
compiled_clip_rounded_shader = custom_target(clip_rounded_spv_shader,
input: shader,
output: clip_rounded_spv_shader,
+ depend_files: gsk_private_vulkan_include_shaders,
command: [
glslc,
stage_arg,