vulkan: Remove unneeded argument

The initial matrix can be computed as needed, so we don't need to
precompute it.
This commit is contained in:
Benjamin Otte 2023-05-10 00:17:01 +02:00
parent 495ee1be3d
commit 5b93a32f90
3 changed files with 1 additions and 11 deletions

View File

@ -338,15 +338,11 @@ gsk_vulkan_render_add_node (GskVulkanRender *self,
GskRenderNode *node)
{
GskVulkanRenderPass *pass;
graphene_matrix_t mv;
graphene_matrix_init_scale (&mv, self->scale, self->scale, 1.0);
pass = gsk_vulkan_render_pass_new (self->vulkan,
self->target,
self->scale,
self->scale,
&mv,
&self->viewport,
self->clip,
VK_NULL_HANDLE);

View File

@ -137,7 +137,6 @@ gsk_vulkan_render_pass_new (GdkVulkanContext *context,
GskVulkanImage *target,
float scale_x,
float scale_y,
graphene_matrix_t *mv,
graphene_rect_t *viewport,
cairo_region_t *clip,
VkSemaphore signal_semaphore)
@ -155,7 +154,7 @@ gsk_vulkan_render_pass_new (GdkVulkanContext *context,
self->scale_x = scale_x;
self->scale_y = scale_y;
self->mv = *mv;
graphene_matrix_init_scale (&self->mv, self->scale_x, self->scale_y, 1.0);
graphene_matrix_init_ortho (&self->p,
viewport->origin.x, viewport->origin.x + viewport->size.width,
viewport->origin.y, viewport->origin.y + viewport->size.height,
@ -1025,7 +1024,6 @@ gsk_vulkan_render_pass_render_offscreen (GdkVulkanContext *vulkan,
graphene_rect_t view;
cairo_region_t *clip;
GskVulkanRenderPass *pass;
graphene_matrix_t mv;
GskVulkanImage *result;
view = GRAPHENE_RECT_INIT (viewport->origin.x,
@ -1052,13 +1050,10 @@ gsk_vulkan_render_pass_render_offscreen (GdkVulkanContext *vulkan,
gsk_vulkan_image_get_height (result)
});
graphene_matrix_init_identity (&mv);
pass = gsk_vulkan_render_pass_new (vulkan,
result,
1,
1,
&mv,
&view,
clip,
semaphore);

View File

@ -14,7 +14,6 @@ GskVulkanRenderPass * gsk_vulkan_render_pass_new (GdkVulk
GskVulkanImage *target,
float scale_x,
float scale_y,
graphene_matrix_t *mv,
graphene_rect_t *viewport,
cairo_region_t *clip,
VkSemaphore signal_semaphore);