diff options
author | Benjamin Otte <otte@redhat.com> | 2019-05-19 04:08:29 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2019-05-21 06:43:59 +0200 |
commit | a1d08b4b52615bd1408976b5503c1bbe7e2c5bd9 (patch) | |
tree | 035ec6b4b84c82703a26ba37aaa380e2f1d696e5 /gsk/vulkan | |
parent | 0fd0be4f9a51af7c0ab0a0a007287e538d755c35 (diff) | |
download | gtk+-a1d08b4b52615bd1408976b5503c1bbe7e2c5bd9.tar.gz |
rendernode: Take a graphene_point_t for the offset
... instead of 2 floats.
Diffstat (limited to 'gsk/vulkan')
-rw-r--r-- | gsk/vulkan/gskvulkancolortextpipeline.c | 7 | ||||
-rw-r--r-- | gsk/vulkan/gskvulkancolortextpipelineprivate.h | 3 | ||||
-rw-r--r-- | gsk/vulkan/gskvulkanrenderpass.c | 6 | ||||
-rw-r--r-- | gsk/vulkan/gskvulkantextpipeline.c | 7 | ||||
-rw-r--r-- | gsk/vulkan/gskvulkantextpipelineprivate.h | 3 |
5 files changed, 10 insertions, 16 deletions
diff --git a/gsk/vulkan/gskvulkancolortextpipeline.c b/gsk/vulkan/gskvulkancolortextpipeline.c index 9770b27938..a7b0ad39a7 100644 --- a/gsk/vulkan/gskvulkancolortextpipeline.c +++ b/gsk/vulkan/gskvulkancolortextpipeline.c @@ -100,8 +100,7 @@ gsk_vulkan_color_text_pipeline_collect_vertex_data (GskVulkanColorTextPipeline * PangoFont *font, guint total_glyphs, const PangoGlyphInfo *glyphs, - float x, - float y, + const graphene_point_t *offset, guint start_glyph, guint num_glyphs, float scale) @@ -132,8 +131,8 @@ gsk_vulkan_color_text_pipeline_collect_vertex_data (GskVulkanColorTextPipeline * instance->tex_rect[2] = glyph->tw; instance->tex_rect[3] = glyph->th; - instance->rect[0] = x + cx + glyph->draw_x; - instance->rect[1] = y + cy + glyph->draw_y; + 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; diff --git a/gsk/vulkan/gskvulkancolortextpipelineprivate.h b/gsk/vulkan/gskvulkancolortextpipelineprivate.h index 2e46b1c6a8..a549c25fcd 100644 --- a/gsk/vulkan/gskvulkancolortextpipelineprivate.h +++ b/gsk/vulkan/gskvulkancolortextpipelineprivate.h @@ -28,8 +28,7 @@ void gsk_vulkan_color_text_pipeline_collect_vertex_data (Gs PangoFont *font, guint total_glyphs, const PangoGlyphInfo *glyphs, - float x, - float y, + const graphene_point_t *offset, guint start_glyph, guint num_glyphs, float scale); diff --git a/gsk/vulkan/gskvulkanrenderpass.c b/gsk/vulkan/gskvulkanrenderpass.c index fedd07a832..55f96456a8 100644 --- a/gsk/vulkan/gskvulkanrenderpass.c +++ b/gsk/vulkan/gskvulkanrenderpass.c @@ -1206,8 +1206,7 @@ gsk_vulkan_render_pass_collect_vertex_data (GskVulkanRenderPass *self, gsk_text_node_get_num_glyphs (op->text.node), gsk_text_node_peek_glyphs (op->text.node), gsk_text_node_peek_color (op->text.node), - gsk_text_node_get_x (op->text.node), - gsk_text_node_get_y (op->text.node), + gsk_text_node_get_offset (op->text.node), op->text.start_glyph, op->text.num_glyphs, op->text.scale); @@ -1225,8 +1224,7 @@ gsk_vulkan_render_pass_collect_vertex_data (GskVulkanRenderPass *self, (PangoFont *)gsk_text_node_peek_font (op->text.node), gsk_text_node_get_num_glyphs (op->text.node), gsk_text_node_peek_glyphs (op->text.node), - gsk_text_node_get_x (op->text.node), - gsk_text_node_get_y (op->text.node), + gsk_text_node_get_offset (op->text.node), op->text.start_glyph, op->text.num_glyphs, op->text.scale); diff --git a/gsk/vulkan/gskvulkantextpipeline.c b/gsk/vulkan/gskvulkantextpipeline.c index 361c53675d..7cd85c5d9a 100644 --- a/gsk/vulkan/gskvulkantextpipeline.c +++ b/gsk/vulkan/gskvulkantextpipeline.c @@ -108,8 +108,7 @@ gsk_vulkan_text_pipeline_collect_vertex_data (GskVulkanTextPipeline *pipeline, guint total_glyphs, const PangoGlyphInfo *glyphs, const GdkRGBA *color, - float x, - float y, + const graphene_point_t *offset, guint start_glyph, guint num_glyphs, float scale) @@ -140,8 +139,8 @@ gsk_vulkan_text_pipeline_collect_vertex_data (GskVulkanTextPipeline *pipeline, instance->tex_rect[2] = glyph->tw; instance->tex_rect[3] = glyph->th; - instance->rect[0] = x + cx + glyph->draw_x; - instance->rect[1] = y + cy + glyph->draw_y; + 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; diff --git a/gsk/vulkan/gskvulkantextpipelineprivate.h b/gsk/vulkan/gskvulkantextpipelineprivate.h index 47517de03c..c186c4d983 100644 --- a/gsk/vulkan/gskvulkantextpipelineprivate.h +++ b/gsk/vulkan/gskvulkantextpipelineprivate.h @@ -29,8 +29,7 @@ void gsk_vulkan_text_pipeline_collect_vertex_data (GskVulka guint total_glyphs, const PangoGlyphInfo *glyphs, const GdkRGBA *color, - float x, - float y, + const graphene_point_t *offset, guint start_glyph, guint num_glyphs, float scale); |