rename pop_group_and_composite

This commit is contained in:
Matthias Clasen 2022-12-14 22:36:54 -05:00 committed by Behdad Esfahbod
parent c9350838c7
commit 627c857f8b
5 changed files with 33 additions and 33 deletions

View File

@ -1018,8 +1018,8 @@ struct PaintComposite
paint_dispatch (&(this+backdrop), c);
c->funcs->push_group (c->data);
paint_dispatch (&(this+src), c);
c->funcs->pop_group_and_composite (c->data, (hb_paint_composite_mode_t) (int)mode);
c->funcs->pop_group_and_composite (c->data, HB_PAINT_COMPOSITE_MODE_SRC_OVER);
c->funcs->pop_group (c->data, (hb_paint_composite_mode_t) (int)mode);
c->funcs->pop_group (c->data, HB_PAINT_COMPOSITE_MODE_SRC_OVER);
}
HBUINT8 format; /* format = 32 */

View File

@ -87,9 +87,9 @@ hb_paint_push_group_nil (hb_paint_funcs_t *funcs, void *paint_data,
void *user_data) {}
static void
hb_paint_pop_group_and_composite_nil (hb_paint_funcs_t *funcs, void *paint_data,
hb_paint_composite_mode_t mode,
void *user_data) {}
hb_paint_pop_group_nil (hb_paint_funcs_t *funcs, void *paint_data,
hb_paint_composite_mode_t mode,
void *user_data) {}
static bool
_hb_paint_funcs_set_preamble (hb_paint_funcs_t *funcs,
@ -317,10 +317,10 @@ hb_paint_push_group (hb_paint_funcs_t *funcs, void *paint_data)
}
void
hb_paint_pop_group_and_composite (hb_paint_funcs_t *funcs, void *paint_data,
hb_paint_composite_mode_t mode)
hb_paint_pop_group (hb_paint_funcs_t *funcs, void *paint_data,
hb_paint_composite_mode_t mode)
{
funcs->pop_group_and_composite (paint_data, mode);
funcs->pop_group (paint_data, mode);
}
#endif

View File

@ -159,14 +159,14 @@ typedef enum {
HB_PAINT_COMPOSITE_MODE_HSL_LUMINOSITY,
} hb_paint_composite_mode_t;
typedef void (*hb_paint_push_group_func_t) (hb_paint_funcs_t *funcs,
void *paint_data,
void *user_data);
typedef void (*hb_paint_push_group_func_t) (hb_paint_funcs_t *funcs,
void *paint_data,
void *user_data);
typedef void (*hb_paint_pop_group_and_composite_func_t) (hb_paint_funcs_t *funcs,
void *paint_data,
hb_paint_composite_mode_t mode,
void *user_data);
typedef void (*hb_paint_pop_group_func_t) (hb_paint_funcs_t *funcs,
void *paint_data,
hb_paint_composite_mode_t mode,
void *user_data);
/**
* hb_paint_funcs_set_push_transform_func:
@ -299,17 +299,17 @@ hb_paint_funcs_set_push_group_func (hb_paint_funcs_t *funcs,
hb_destroy_func_t destroy);
/**
* hb_paint_funcs_set_pop_group_and_composite_func:
* hb_paint_funcs_set_pop_group_func:
* @funcs:
* @func: (closure user_data) (destroy destroy) (scope notified):
* @user_data:
* @destroy: (nullable)
*/
HB_EXTERN void
hb_paint_funcs_set_pop_group_and_composite_func (hb_paint_funcs_t *funcs,
hb_paint_pop_group_and_composite_func_t func,
void *user_data,
hb_destroy_func_t destroy);
hb_paint_funcs_set_pop_group_func (hb_paint_funcs_t *funcs,
hb_paint_pop_group_func_t func,
void *user_data,
hb_destroy_func_t destroy);
HB_EXTERN void
hb_paint_push_transform (hb_paint_funcs_t *funcs, void *paint_data,
@ -359,8 +359,8 @@ HB_EXTERN void
hb_paint_push_group (hb_paint_funcs_t *funcs, void *paint_data);
HB_EXTERN void
hb_paint_pop_group_and_composite (hb_paint_funcs_t *funcs, void *paint_data,
hb_paint_composite_mode_t mode);
hb_paint_pop_group (hb_paint_funcs_t *funcs, void *paint_data,
hb_paint_composite_mode_t mode);
HB_END_DECLS

View File

@ -38,7 +38,7 @@
HB_PAINT_FUNC_IMPLEMENT (radial_gradient) \
HB_PAINT_FUNC_IMPLEMENT (sweep_gradient) \
HB_PAINT_FUNC_IMPLEMENT (push_group) \
HB_PAINT_FUNC_IMPLEMENT (pop_group_and_composite) \
HB_PAINT_FUNC_IMPLEMENT (pop_group) \
/* ^--- Add new callbacks here */
struct hb_paint_funcs_t
@ -118,11 +118,11 @@ struct hb_paint_funcs_t
void push_group (void *paint_data)
{ func.push_group (this, paint_data,
!user_data ? nullptr : user_data->push_group); }
void pop_group_and_composite (void *paint_data,
hb_paint_composite_mode_t mode)
{ func.pop_group_and_composite (this, paint_data,
mode,
!user_data ? nullptr : user_data->pop_group_and_composite); }
void pop_group (void *paint_data,
hb_paint_composite_mode_t mode)
{ func.pop_group (this, paint_data,
mode,
!user_data ? nullptr : user_data->pop_group); }
};
DECLARE_NULL_INSTANCE (hb_paint_funcs_t);

View File

@ -140,10 +140,10 @@ push_group (hb_paint_funcs_t *funcs,
}
static void
pop_group_and_composite (hb_paint_funcs_t *funcs,
void *paint_data,
hb_paint_composite_mode_t mode,
void *user_data)
pop_group (hb_paint_funcs_t *funcs,
void *paint_data,
hb_paint_composite_mode_t mode,
void *user_data)
{
paint_data_t *data = user_data;
data->level--;
@ -167,7 +167,7 @@ int main (int argc, char *argv[])
hb_paint_funcs_set_push_clip_rect_func (funcs, push_clip_rect, &data, NULL);
hb_paint_funcs_set_pop_clip_func (funcs, pop_clip, &data, NULL);
hb_paint_funcs_set_push_group_func (funcs, push_group, &data, NULL);
hb_paint_funcs_set_pop_group_and_composite_func (funcs, pop_group_and_composite, &data, NULL);
hb_paint_funcs_set_pop_group_func (funcs, pop_group, &data, NULL);
hb_paint_funcs_set_solid_func (funcs, solid, &data, NULL);
hb_paint_funcs_set_linear_gradient_func (funcs, linear_gradient, &data, NULL);
hb_paint_funcs_set_radial_gradient_func (funcs, radial_gradient, &data, NULL);