gpu: Rename function

We want to reuse gsk_gpu_color_to_float() for use with GdkColor and this
function will be replaced. But until that's fully done, we need 2
different names.

So rename this one to something else
This commit is contained in:
Benjamin Otte 2024-08-03 20:59:40 -04:00 committed by Matthias Clasen
parent 3fca84f974
commit 126d689086
8 changed files with 9 additions and 9 deletions

View File

@ -77,7 +77,7 @@ gsk_gpu_blur_op_full (GskGpuFrame *frame,
gsk_gpu_rect_to_float (image->coverage, offset, instance->rect);
gsk_gpu_rect_to_float (image->bounds, offset, instance->tex_rect);
graphene_vec2_to_float (blur_direction, instance->blur_direction);
gsk_gpu_color_to_float (blur_color, instance->blur_color);
gsk_gpu_vec4_to_float (blur_color, instance->blur_color);
}
void

View File

@ -121,7 +121,7 @@ gsk_gpu_border_op (GskGpuFrame *frame,
for (i = 0; i < 4; i++)
{
instance->border_widths[i] = widths[i];
gsk_gpu_color_to_float (colors[i], &instance->border_colors[4 * i]);
gsk_gpu_vec4_to_float (colors[i], &instance->border_colors[4 * i]);
}
instance->offset[0] = inside_offset->x;
instance->offset[1] = inside_offset->y;

View File

@ -102,7 +102,7 @@ gsk_gpu_box_shadow_op (GskGpuFrame *frame,
gsk_gpu_rect_to_float (bounds, offset, instance->bounds);
gsk_rounded_rect_to_float (outline, offset, instance->outline);
gsk_gpu_color_to_float (color, instance->color);
gsk_gpu_vec4_to_float (color, instance->color);
instance->shadow_offset[0] = shadow_offset->x;
instance->shadow_offset[1] = shadow_offset->y;
instance->shadow_spread = spread;

View File

@ -70,5 +70,5 @@ gsk_gpu_colorize_op (GskGpuFrame *frame,
gsk_gpu_rect_to_float (image->coverage ? image->coverage : image->bounds, offset, instance->rect);
gsk_gpu_rect_to_float (image->bounds, offset, instance->tex_rect);
gsk_gpu_color_to_float (color, instance->color);
gsk_gpu_vec4_to_float (color, instance->color);
}

View File

@ -70,5 +70,5 @@ gsk_gpu_color_op (GskGpuFrame *frame,
&instance);
gsk_gpu_rect_to_float (rect, offset, instance->rect);
gsk_gpu_color_to_float (color, instance->color);
gsk_gpu_vec4_to_float (color, instance->color);
}

View File

@ -340,7 +340,7 @@ gsk_gpu_render_pass_begin_op (GskGpuFrame *frame,
self->area = *area;
self->clear = clear_color_or_null != NULL;
if (clear_color_or_null)
gsk_gpu_color_to_float (clear_color_or_null, self->clear_color);
gsk_gpu_vec4_to_float (clear_color_or_null, self->clear_color);
self->pass_type = pass_type;
}

View File

@ -69,6 +69,6 @@ gsk_gpu_rounded_color_op (GskGpuFrame *frame,
&instance);
gsk_rounded_rect_to_float (outline, offset, instance->outline);
gsk_gpu_color_to_float (color, instance->color);
gsk_gpu_vec4_to_float (color, instance->color);
}

View File

@ -84,8 +84,8 @@ GskGpuOp * gsk_gpu_shader_op_gl_command (GskGpuO
#define GSK_VEC4_TRANSPARENT (float[4]) { 0.0f, 0.0f, 0.0f, 0.0f }
static inline void
gsk_gpu_color_to_float (const float color[4],
float values[4])
gsk_gpu_vec4_to_float (const float color[4],
float values[4])
{
values[0] = color[0];
values[1] = color[1];