diff --git a/gsk/vulkan/gskvulkanrenderer.c b/gsk/vulkan/gskvulkanrenderer.c index 71ec47b543..a14e6bd373 100644 --- a/gsk/vulkan/gskvulkanrenderer.c +++ b/gsk/vulkan/gskvulkanrenderer.c @@ -228,6 +228,7 @@ gsk_vulkan_renderer_render_texture (GskRenderer *renderer, GskVulkanRender *render; GskVulkanImage *image; GdkTexture *texture; + graphene_rect_t rounded_viewport; #ifdef G_ENABLE_DEBUG GskProfiler *profiler; gint64 cpu_time; @@ -244,11 +245,15 @@ gsk_vulkan_renderer_render_texture (GskRenderer *renderer, render = gsk_vulkan_render_new (renderer, self->vulkan); + rounded_viewport = GRAPHENE_RECT_INIT (viewport->origin.x, + viewport->origin.y, + ceil (viewport->size.width), + ceil (viewport->size.height)); image = gsk_vulkan_image_new_for_framebuffer (self->vulkan, - ceil (viewport->size.width), - ceil (viewport->size.height)); + rounded_viewport.size.width, + rounded_viewport.size.height); - gsk_vulkan_render_reset (render, image, viewport, NULL); + gsk_vulkan_render_reset (render, image, &rounded_viewport, NULL); gsk_vulkan_render_add_node (render, root); gsk_vulkan_render_upload (render); gsk_vulkan_render_draw (render);