vulkan: Don't transform the viewport rect
authorBenjamin Otte <otte@redhat.com>
Tue, 9 May 2023 21:48:44 +0000 (23:48 +0200)
committerBenjamin Otte <otte@redhat.com>
Sun, 4 Jun 2023 17:42:01 +0000 (19:42 +0200)
We don't want to render the offscreen trnsformed, we want to render it
as-is.

We lose the correct scale factor, but that requires some separate work,
so for now it gets a bit blurry on hidpi.

gsk/vulkan/gskvulkanrenderpass.c

index 0710222dc44c88baf526a51f5cb3e52216bac7f4..ada675c08e8042bd211ba08d596286d8797a4201 100644 (file)
@@ -1101,7 +1101,6 @@ gsk_vulkan_render_pass_get_node_as_texture (GskVulkanRenderPass   *self,
 
     default:
       {
-        graphene_rect_t view;
         graphene_rect_t clipped;
 
         if (current_clip)
@@ -1112,8 +1111,6 @@ gsk_vulkan_render_pass_get_node_as_texture (GskVulkanRenderPass   *self,
         if (clipped.size.width == 0 || clipped.size.height == 0)
           return NULL;
 
-        graphene_matrix_transform_bounds (&self->mv, &clipped, &view);
-
         /* assuming the unclipped bounds should go to texture coordinates 0..1,
          * calculate the coordinates for the clipped texture size
          */
@@ -1135,7 +1132,7 @@ gsk_vulkan_render_pass_get_node_as_texture (GskVulkanRenderPass   *self,
                                                         uploader,
                                                         semaphore,
                                                         node,
-                                                        &view);
+                                                        &clipped);
       }
    }