summaryrefslogtreecommitdiff
path: root/gsk
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2018-03-31 08:17:42 +0200
committerBenjamin Otte <otte@redhat.com>2018-04-05 14:56:38 +0200
commit0f184d3270cfac522a05ae06d28cc2f1e32c0e6d (patch)
tree7b854add4e36b00a3bf679a734d88f23d6e83201 /gsk
parente3a717363bd4898aa72db250b6ab5af68fae284b (diff)
downloadgtk+-0f184d3270cfac522a05ae06d28cc2f1e32c0e6d.tar.gz
vulkan: Always render clip extents
Now that we have the full render nodes available, there is not much benefit in fine-grained control over multiple rectangles. In particular, it's causing pain with complex regions. There might be a benefit in clipping to the region's rectangles in cases like widget-factory where the whole diff is made up of the 2 rectangles of spinner and the pulsing progress bar, but it needs a good heuristic for where this is useful.
Diffstat (limited to 'gsk')
-rw-r--r--gsk/vulkan/gskvulkanrender.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gsk/vulkan/gskvulkanrender.c b/gsk/vulkan/gskvulkanrender.c
index a544f5df72..29c54aae3a 100644
--- a/gsk/vulkan/gskvulkanrender.c
+++ b/gsk/vulkan/gskvulkanrender.c
@@ -86,7 +86,12 @@ gsk_vulkan_render_setup (GskVulkanRender *self,
}
if (clip)
{
- self->clip = cairo_region_reference ((cairo_region_t *) clip);
+ cairo_rectangle_int_t extents;
+ cairo_region_get_extents (clip, &extents);
+ self->clip = cairo_region_create_rectangle (&(cairo_rectangle_int_t) {
+ extents.x, extents.y,
+ extents.width, extents.height
+ });
}
else
{