mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-13 14:00:09 +00:00
vulkan: Simplify switch statement
All branches do the same thing now, so pull them all into the same branch.
This commit is contained in:
parent
328cdf7b2a
commit
1f7dcc1286
@ -1640,62 +1640,26 @@ gsk_vulkan_render_pass_count_vertex_data (GskVulkanRenderPass *self)
|
|||||||
case GSK_VULKAN_OP_FALLBACK_ROUNDED_CLIP:
|
case GSK_VULKAN_OP_FALLBACK_ROUNDED_CLIP:
|
||||||
case GSK_VULKAN_OP_TEXTURE:
|
case GSK_VULKAN_OP_TEXTURE:
|
||||||
case GSK_VULKAN_OP_REPEAT:
|
case GSK_VULKAN_OP_REPEAT:
|
||||||
|
case GSK_VULKAN_OP_COLOR:
|
||||||
|
case GSK_VULKAN_OP_LINEAR_GRADIENT:
|
||||||
|
case GSK_VULKAN_OP_OPACITY:
|
||||||
|
case GSK_VULKAN_OP_COLOR_MATRIX:
|
||||||
|
case GSK_VULKAN_OP_BLUR:
|
||||||
|
case GSK_VULKAN_OP_BORDER:
|
||||||
|
case GSK_VULKAN_OP_INSET_SHADOW:
|
||||||
|
case GSK_VULKAN_OP_OUTSET_SHADOW:
|
||||||
|
case GSK_VULKAN_OP_CROSS_FADE:
|
||||||
|
case GSK_VULKAN_OP_BLEND_MODE:
|
||||||
op->render.vertex_count = gsk_vulkan_pipeline_get_vertex_stride (op->render.pipeline);
|
op->render.vertex_count = gsk_vulkan_pipeline_get_vertex_stride (op->render.pipeline);
|
||||||
n_bytes += op->render.vertex_count;
|
n_bytes += op->render.vertex_count;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GSK_VULKAN_OP_TEXT:
|
case GSK_VULKAN_OP_TEXT:
|
||||||
op->text.vertex_count = gsk_vulkan_pipeline_get_vertex_stride (op->render.pipeline) * op->text.num_glyphs;
|
|
||||||
n_bytes += op->text.vertex_count;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case GSK_VULKAN_OP_COLOR_TEXT:
|
case GSK_VULKAN_OP_COLOR_TEXT:
|
||||||
op->text.vertex_count = gsk_vulkan_pipeline_get_vertex_stride (op->render.pipeline) * op->text.num_glyphs;
|
op->text.vertex_count = gsk_vulkan_pipeline_get_vertex_stride (op->render.pipeline) * op->text.num_glyphs;
|
||||||
n_bytes += op->text.vertex_count;
|
n_bytes += op->text.vertex_count;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GSK_VULKAN_OP_COLOR:
|
|
||||||
op->render.vertex_count = gsk_vulkan_pipeline_get_vertex_stride (op->render.pipeline);
|
|
||||||
n_bytes += op->render.vertex_count;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case GSK_VULKAN_OP_LINEAR_GRADIENT:
|
|
||||||
op->render.vertex_count = gsk_vulkan_pipeline_get_vertex_stride (op->render.pipeline);
|
|
||||||
n_bytes += op->render.vertex_count;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case GSK_VULKAN_OP_OPACITY:
|
|
||||||
case GSK_VULKAN_OP_COLOR_MATRIX:
|
|
||||||
op->render.vertex_count = gsk_vulkan_pipeline_get_vertex_stride (op->render.pipeline);
|
|
||||||
n_bytes += op->render.vertex_count;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case GSK_VULKAN_OP_BLUR:
|
|
||||||
op->render.vertex_count = gsk_vulkan_pipeline_get_vertex_stride (op->render.pipeline);
|
|
||||||
n_bytes += op->render.vertex_count;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case GSK_VULKAN_OP_BORDER:
|
|
||||||
op->render.vertex_count = gsk_vulkan_pipeline_get_vertex_stride (op->render.pipeline);
|
|
||||||
n_bytes += op->render.vertex_count;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case GSK_VULKAN_OP_INSET_SHADOW:
|
|
||||||
case GSK_VULKAN_OP_OUTSET_SHADOW:
|
|
||||||
op->render.vertex_count = gsk_vulkan_pipeline_get_vertex_stride (op->render.pipeline);
|
|
||||||
n_bytes += op->render.vertex_count;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case GSK_VULKAN_OP_CROSS_FADE:
|
|
||||||
op->render.vertex_count = gsk_vulkan_pipeline_get_vertex_stride (op->render.pipeline);
|
|
||||||
n_bytes += op->render.vertex_count;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case GSK_VULKAN_OP_BLEND_MODE:
|
|
||||||
op->render.vertex_count = gsk_vulkan_pipeline_get_vertex_stride (op->render.pipeline);
|
|
||||||
n_bytes += op->render.vertex_count;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
g_assert_not_reached ();
|
g_assert_not_reached ();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user