gsk/vulkan: Cosmetics
authorGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Sat, 8 Apr 2023 23:09:40 +0000 (20:09 -0300)
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Sat, 8 Apr 2023 23:13:13 +0000 (20:13 -0300)
Reorder code to match the order used in shaders.

gsk/vulkan/gskvulkancolortextpipeline.c
gsk/vulkan/gskvulkantextpipeline.c

index 5ffe62adcc310687dc272e433238700e9ee185b9..295cf53339fa3fe6500075726d720fd64053ffda 100644 (file)
@@ -131,16 +131,16 @@ gsk_vulkan_color_text_pipeline_collect_vertex_data (GskVulkanColorTextPipeline *
                                                         gi->geometry.y_offset,
                                                         scale);
 
-          instance->tex_rect[0] = glyph->tx;
-          instance->tex_rect[1] = glyph->ty;
-          instance->tex_rect[2] = glyph->tw;
-          instance->tex_rect[3] = glyph->th;
-
           instance->rect[0] = offset->x + cx + glyph->draw_x;
           instance->rect[1] = offset->y + cy + glyph->draw_y;
           instance->rect[2] = glyph->draw_width;
           instance->rect[3] = glyph->draw_height;
 
+          instance->tex_rect[0] = glyph->tx;
+          instance->tex_rect[1] = glyph->ty;
+          instance->tex_rect[2] = glyph->tw;
+          instance->tex_rect[3] = glyph->th;
+
           count++;
        }
      x_position += gi->geometry.width;
index 9544c6a7c766fd20ce37450a91c30e04b412aa6a..41e40f13954b1c850fd74709dfb88edb64501aac 100644 (file)
@@ -139,16 +139,16 @@ gsk_vulkan_text_pipeline_collect_vertex_data (GskVulkanTextPipeline  *pipeline,
                                                         gi->geometry.y_offset,
                                                         scale);
 
-          instance->tex_rect[0] = glyph->tx;
-          instance->tex_rect[1] = glyph->ty;
-          instance->tex_rect[2] = glyph->tw;
-          instance->tex_rect[3] = glyph->th;
-
           instance->rect[0] = offset->x + cx + glyph->draw_x;
           instance->rect[1] = offset->y + cy + glyph->draw_y;
           instance->rect[2] = glyph->draw_width;
           instance->rect[3] = glyph->draw_height;
 
+          instance->tex_rect[0] = glyph->tx;
+          instance->tex_rect[1] = glyph->ty;
+          instance->tex_rect[2] = glyph->tw;
+          instance->tex_rect[3] = glyph->th;
+
           instance->color[0] = color->red;
           instance->color[1] = color->green;
           instance->color[2] = color->blue;