mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-25 21:21:21 +00:00
vulkan: Split out a function
This is preparation for future changes.
This commit is contained in:
parent
b00ca0d699
commit
bdbb1398db
@ -274,6 +274,13 @@ gsk_vulkan_render_pass_free (GskVulkanRenderPass *self)
|
||||
g_free (self);
|
||||
}
|
||||
|
||||
static void
|
||||
gsk_vulkan_render_pass_add_op (GskVulkanRenderPass *self,
|
||||
GskVulkanOp *op)
|
||||
{
|
||||
g_array_append_val (self->render_ops, *op);
|
||||
}
|
||||
|
||||
static void
|
||||
gsk_vulkan_render_pass_append_scissor (GskVulkanRenderPass *self,
|
||||
GskRenderNode *node,
|
||||
@ -284,7 +291,8 @@ gsk_vulkan_render_pass_append_scissor (GskVulkanRenderPass *self,
|
||||
.scissor.node = node,
|
||||
.scissor.rect = state->scissor
|
||||
};
|
||||
g_array_append_val (self->render_ops, op);
|
||||
|
||||
gsk_vulkan_render_pass_add_op (self, &op);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -307,7 +315,7 @@ gsk_vulkan_render_pass_append_push_constants (GskVulkanRenderPass *self,
|
||||
else
|
||||
graphene_matrix_init_from_matrix (&op.constants.mvp, &state->projection);
|
||||
|
||||
g_array_append_val (self->render_ops, op);
|
||||
gsk_vulkan_render_pass_add_op (self, &op);
|
||||
}
|
||||
|
||||
#define FALLBACK(...) G_STMT_START { \
|
||||
@ -362,7 +370,7 @@ gsk_vulkan_render_pass_add_fallback_node (GskVulkanRenderPass *self,
|
||||
}
|
||||
|
||||
op.render.pipeline = gsk_vulkan_render_pass_get_pipeline (self, render, GSK_VULKAN_PIPELINE_TEXTURE);
|
||||
g_array_append_val (self->render_ops, op);
|
||||
gsk_vulkan_render_pass_add_op (self, &op);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@ -426,7 +434,7 @@ gsk_vulkan_render_pass_add_color_node (GskVulkanRenderPass *self,
|
||||
pipeline_type = GSK_VULKAN_PIPELINE_COLOR_CLIP_ROUNDED;
|
||||
|
||||
op.render.pipeline = gsk_vulkan_render_pass_get_pipeline (self, render, pipeline_type);
|
||||
g_array_append_val (self->render_ops, op);
|
||||
gsk_vulkan_render_pass_add_op (self, &op);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@ -452,7 +460,7 @@ gsk_vulkan_render_pass_add_linear_gradient_node (GskVulkanRenderPass *self
|
||||
pipeline_type = GSK_VULKAN_PIPELINE_LINEAR_GRADIENT_CLIP_ROUNDED;
|
||||
|
||||
op.render.pipeline = gsk_vulkan_render_pass_get_pipeline (self, render, pipeline_type);
|
||||
g_array_append_val (self->render_ops, op);
|
||||
gsk_vulkan_render_pass_add_op (self, &op);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@ -478,7 +486,7 @@ gsk_vulkan_render_pass_add_border_node (GskVulkanRenderPass *self,
|
||||
pipeline_type = GSK_VULKAN_PIPELINE_BORDER_CLIP_ROUNDED;
|
||||
|
||||
op.render.pipeline = gsk_vulkan_render_pass_get_pipeline (self, render, pipeline_type);
|
||||
g_array_append_val (self->render_ops, op);
|
||||
gsk_vulkan_render_pass_add_op (self, &op);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@ -504,7 +512,7 @@ gsk_vulkan_render_pass_add_texture_node (GskVulkanRenderPass *self,
|
||||
pipeline_type = GSK_VULKAN_PIPELINE_TEXTURE_CLIP_ROUNDED;
|
||||
|
||||
op.render.pipeline = gsk_vulkan_render_pass_get_pipeline (self, render, pipeline_type);
|
||||
g_array_append_val (self->render_ops, op);
|
||||
gsk_vulkan_render_pass_add_op (self, &op);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@ -530,7 +538,7 @@ gsk_vulkan_render_pass_add_texture_scale_node (GskVulkanRenderPass *self,
|
||||
pipeline_type = GSK_VULKAN_PIPELINE_TEXTURE_CLIP_ROUNDED;
|
||||
|
||||
op.render.pipeline = gsk_vulkan_render_pass_get_pipeline (self, render, pipeline_type);
|
||||
g_array_append_val (self->render_ops, op);
|
||||
gsk_vulkan_render_pass_add_op (self, &op);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@ -558,7 +566,7 @@ gsk_vulkan_render_pass_add_inset_shadow_node (GskVulkanRenderPass *self,
|
||||
pipeline_type = GSK_VULKAN_PIPELINE_INSET_SHADOW_CLIP_ROUNDED;
|
||||
|
||||
op.render.pipeline = gsk_vulkan_render_pass_get_pipeline (self, render, pipeline_type);
|
||||
g_array_append_val (self->render_ops, op);
|
||||
gsk_vulkan_render_pass_add_op (self, &op);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@ -586,7 +594,7 @@ gsk_vulkan_render_pass_add_outset_shadow_node (GskVulkanRenderPass *self,
|
||||
pipeline_type = GSK_VULKAN_PIPELINE_OUTSET_SHADOW_CLIP_ROUNDED;
|
||||
|
||||
op.render.pipeline = gsk_vulkan_render_pass_get_pipeline (self, render, pipeline_type);
|
||||
g_array_append_val (self->render_ops, op);
|
||||
gsk_vulkan_render_pass_add_op (self, &op);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@ -766,7 +774,7 @@ gsk_vulkan_render_pass_add_opacity_node (GskVulkanRenderPass *self,
|
||||
pipeline_type = GSK_VULKAN_PIPELINE_COLOR_MATRIX_CLIP_ROUNDED;
|
||||
|
||||
op.render.pipeline = gsk_vulkan_render_pass_get_pipeline (self, render, pipeline_type);
|
||||
g_array_append_val (self->render_ops, op);
|
||||
gsk_vulkan_render_pass_add_op (self, &op);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@ -792,7 +800,7 @@ gsk_vulkan_render_pass_add_color_matrix_node (GskVulkanRenderPass *self,
|
||||
pipeline_type = GSK_VULKAN_PIPELINE_COLOR_MATRIX_CLIP_ROUNDED;
|
||||
|
||||
op.render.pipeline = gsk_vulkan_render_pass_get_pipeline (self, render, pipeline_type);
|
||||
g_array_append_val (self->render_ops, op);
|
||||
gsk_vulkan_render_pass_add_op (self, &op);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@ -962,7 +970,7 @@ gsk_vulkan_render_pass_add_repeat_node (GskVulkanRenderPass *self,
|
||||
pipeline_type = GSK_VULKAN_PIPELINE_TEXTURE_CLIP_ROUNDED;
|
||||
|
||||
op.render.pipeline = gsk_vulkan_render_pass_get_pipeline (self, render, pipeline_type);
|
||||
g_array_append_val (self->render_ops, op);
|
||||
gsk_vulkan_render_pass_add_op (self, &op);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@ -988,7 +996,7 @@ gsk_vulkan_render_pass_add_blend_node (GskVulkanRenderPass *self,
|
||||
pipeline_type = GSK_VULKAN_PIPELINE_BLEND_MODE_CLIP_ROUNDED;
|
||||
|
||||
op.render.pipeline = gsk_vulkan_render_pass_get_pipeline (self, render, pipeline_type);
|
||||
g_array_append_val (self->render_ops, op);
|
||||
gsk_vulkan_render_pass_add_op (self, &op);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@ -1014,7 +1022,7 @@ gsk_vulkan_render_pass_add_cross_fade_node (GskVulkanRenderPass *self,
|
||||
pipeline_type = GSK_VULKAN_PIPELINE_CROSS_FADE_CLIP_ROUNDED;
|
||||
|
||||
op.render.pipeline = gsk_vulkan_render_pass_get_pipeline (self, render, pipeline_type);
|
||||
g_array_append_val (self->render_ops, op);
|
||||
gsk_vulkan_render_pass_add_op (self, &op);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@ -1087,7 +1095,7 @@ gsk_vulkan_render_pass_add_text_node (GskVulkanRenderPass *self,
|
||||
{
|
||||
op.text.num_glyphs = count;
|
||||
|
||||
g_array_append_val (self->render_ops, op);
|
||||
gsk_vulkan_render_pass_add_op (self, &op);
|
||||
|
||||
count = 1;
|
||||
op.text.start_glyph = i;
|
||||
@ -1102,7 +1110,7 @@ gsk_vulkan_render_pass_add_text_node (GskVulkanRenderPass *self,
|
||||
if (op.text.texture_index != G_MAXUINT && count != 0)
|
||||
{
|
||||
op.text.num_glyphs = count;
|
||||
g_array_append_val (self->render_ops, op);
|
||||
gsk_vulkan_render_pass_add_op (self, &op);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
@ -1129,7 +1137,7 @@ gsk_vulkan_render_pass_add_blur_node (GskVulkanRenderPass *self,
|
||||
pipeline_type = GSK_VULKAN_PIPELINE_BLUR_CLIP_ROUNDED;
|
||||
|
||||
op.render.pipeline = gsk_vulkan_render_pass_get_pipeline (self, render, pipeline_type);
|
||||
g_array_append_val (self->render_ops, op);
|
||||
gsk_vulkan_render_pass_add_op (self, &op);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user