clutter: Remove marshallers that are available in GLib

Some of the marshallers we generate in `clutter-marshal.list` are also
available in GLib, so we don't need to generate them ourselves. Even
more, by passing NULL to `g_signal_new` in these cases will actually
internally optimize this even more by also setting the valist
marshaller, which is a little bit faster than the regular marshalling
using `GValue` and libffi.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/700
This commit is contained in:
Niels De Graef 2019-07-24 18:17:06 +02:00 committed by Jonas Ådahl
parent 0db38c4999
commit c4a9117ef8
20 changed files with 50 additions and 107 deletions

View File

@ -8005,8 +8005,7 @@ clutter_actor_class_init (ClutterActorClass *klass)
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_CLEANUP | G_SIGNAL_NO_RECURSE | G_SIGNAL_NO_HOOKS,
G_STRUCT_OFFSET (ClutterActorClass, destroy),
NULL, NULL,
_clutter_marshal_VOID__VOID,
NULL, NULL, NULL,
G_TYPE_NONE, 0);
/**
* ClutterActor::show:
@ -8022,8 +8021,7 @@ clutter_actor_class_init (ClutterActorClass *klass)
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (ClutterActorClass, show),
NULL, NULL,
_clutter_marshal_VOID__VOID,
NULL, NULL, NULL,
G_TYPE_NONE, 0);
/**
* ClutterActor::hide:
@ -8039,8 +8037,7 @@ clutter_actor_class_init (ClutterActorClass *klass)
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (ClutterActorClass, hide),
NULL, NULL,
_clutter_marshal_VOID__VOID,
NULL, NULL, NULL,
G_TYPE_NONE, 0);
/**
* ClutterActor::parent-set:
@ -8056,8 +8053,7 @@ clutter_actor_class_init (ClutterActorClass *klass)
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (ClutterActorClass, parent_set),
NULL, NULL,
_clutter_marshal_VOID__OBJECT,
NULL, NULL, NULL,
G_TYPE_NONE, 1,
CLUTTER_TYPE_ACTOR);
@ -8149,8 +8145,7 @@ clutter_actor_class_init (ClutterActorClass *klass)
G_SIGNAL_RUN_LAST |
G_SIGNAL_NO_HOOKS,
G_STRUCT_OFFSET (ClutterActorClass, queue_relayout),
NULL, NULL,
_clutter_marshal_VOID__VOID,
NULL, NULL, NULL,
G_TYPE_NONE, 0);
/**
@ -8324,8 +8319,7 @@ clutter_actor_class_init (ClutterActorClass *klass)
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (ClutterActorClass, key_focus_in),
NULL, NULL,
_clutter_marshal_VOID__VOID,
NULL, NULL, NULL,
G_TYPE_NONE, 0);
/**
@ -8341,8 +8335,7 @@ clutter_actor_class_init (ClutterActorClass *klass)
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (ClutterActorClass, key_focus_out),
NULL, NULL,
_clutter_marshal_VOID__VOID,
NULL, NULL, NULL,
G_TYPE_NONE, 0);
/**
@ -8446,8 +8439,7 @@ clutter_actor_class_init (ClutterActorClass *klass)
G_SIGNAL_NO_HOOKS |
G_SIGNAL_DEPRECATED,
G_STRUCT_OFFSET (ClutterActorClass, paint),
NULL, NULL,
_clutter_marshal_VOID__VOID,
NULL, NULL, NULL,
G_TYPE_NONE, 0);
/**
* ClutterActor::realize:
@ -8466,8 +8458,7 @@ clutter_actor_class_init (ClutterActorClass *klass)
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST | G_SIGNAL_DEPRECATED,
G_STRUCT_OFFSET (ClutterActorClass, realize),
NULL, NULL,
_clutter_marshal_VOID__VOID,
NULL, NULL, NULL,
G_TYPE_NONE, 0);
/**
* ClutterActor::unrealize:
@ -8486,8 +8477,7 @@ clutter_actor_class_init (ClutterActorClass *klass)
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST | G_SIGNAL_DEPRECATED,
G_STRUCT_OFFSET (ClutterActorClass, unrealize),
NULL, NULL,
_clutter_marshal_VOID__VOID,
NULL, NULL, NULL,
G_TYPE_NONE, 0);
/**
@ -8515,8 +8505,7 @@ clutter_actor_class_init (ClutterActorClass *klass)
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST | G_SIGNAL_DEPRECATED,
G_STRUCT_OFFSET (ClutterActorClass, pick),
NULL, NULL,
_clutter_marshal_VOID__BOXED,
NULL, NULL, NULL,
G_TYPE_NONE, 1,
CLUTTER_TYPE_COLOR | G_SIGNAL_TYPE_STATIC_SCOPE);
@ -8560,8 +8549,7 @@ clutter_actor_class_init (ClutterActorClass *klass)
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
_clutter_marshal_VOID__VOID,
NULL, NULL, NULL,
G_TYPE_NONE, 0);
/**

View File

@ -636,8 +636,7 @@ clutter_backend_class_init (ClutterBackendClass *klass)
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (ClutterBackendClass, resolution_changed),
NULL, NULL,
_clutter_marshal_VOID__VOID,
NULL, NULL, NULL,
G_TYPE_NONE, 0);
/**
@ -654,8 +653,7 @@ clutter_backend_class_init (ClutterBackendClass *klass)
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (ClutterBackendClass, font_changed),
NULL, NULL,
_clutter_marshal_VOID__VOID,
NULL, NULL, NULL,
G_TYPE_NONE, 0);
/**
@ -672,8 +670,7 @@ clutter_backend_class_init (ClutterBackendClass *klass)
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (ClutterBackendClass, settings_changed),
NULL, NULL,
_clutter_marshal_VOID__VOID,
NULL, NULL, NULL,
G_TYPE_NONE, 0);
klass->resolution_changed = clutter_backend_real_resolution_changed;

View File

@ -666,8 +666,7 @@ clutter_click_action_class_init (ClutterClickActionClass *klass)
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (ClutterClickActionClass, clicked),
NULL, NULL,
_clutter_marshal_VOID__OBJECT,
NULL, NULL, NULL,
G_TYPE_NONE, 1,
CLUTTER_TYPE_ACTOR);

View File

@ -197,8 +197,7 @@ clutter_container_default_init (ClutterContainerInterface *iface)
iface_type,
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (ClutterContainerIface, actor_added),
NULL, NULL,
_clutter_marshal_VOID__OBJECT,
NULL, NULL, NULL,
G_TYPE_NONE, 1,
CLUTTER_TYPE_ACTOR);
/**
@ -216,8 +215,7 @@ clutter_container_default_init (ClutterContainerInterface *iface)
iface_type,
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (ClutterContainerIface, actor_removed),
NULL, NULL,
_clutter_marshal_VOID__OBJECT,
NULL, NULL, NULL,
G_TYPE_NONE, 1,
CLUTTER_TYPE_ACTOR);

View File

@ -129,8 +129,7 @@ clutter_content_default_init (ClutterContentInterface *iface)
G_TYPE_FROM_INTERFACE (iface),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (ClutterContentInterface, attached),
NULL, NULL,
_clutter_marshal_VOID__OBJECT,
NULL, NULL, NULL,
G_TYPE_NONE, 1,
CLUTTER_TYPE_ACTOR);
@ -149,8 +148,7 @@ clutter_content_default_init (ClutterContentInterface *iface)
G_TYPE_FROM_INTERFACE (iface),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (ClutterContentInterface, detached),
NULL, NULL,
_clutter_marshal_VOID__OBJECT,
NULL, NULL, NULL,
G_TYPE_NONE, 1,
CLUTTER_TYPE_ACTOR);
}

View File

@ -171,8 +171,7 @@ clutter_device_manager_class_init (ClutterDeviceManagerClass *klass)
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
_clutter_marshal_VOID__OBJECT,
NULL, NULL, NULL,
G_TYPE_NONE, 1,
CLUTTER_TYPE_INPUT_DEVICE);
@ -191,8 +190,7 @@ clutter_device_manager_class_init (ClutterDeviceManagerClass *klass)
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
_clutter_marshal_VOID__OBJECT,
NULL, NULL, NULL,
G_TYPE_NONE, 1,
CLUTTER_TYPE_INPUT_DEVICE);

View File

@ -428,8 +428,7 @@ clutter_drop_action_class_init (ClutterDropActionClass *klass)
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (ClutterDropActionClass, over_in),
NULL, NULL,
_clutter_marshal_VOID__OBJECT,
NULL, NULL, NULL,
G_TYPE_NONE, 1,
CLUTTER_TYPE_ACTOR);
@ -448,8 +447,7 @@ clutter_drop_action_class_init (ClutterDropActionClass *klass)
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (ClutterDropActionClass, over_out),
NULL, NULL,
_clutter_marshal_VOID__OBJECT,
NULL, NULL, NULL,
G_TYPE_NONE, 1,
CLUTTER_TYPE_ACTOR);

View File

@ -804,8 +804,7 @@ clutter_gesture_action_class_init (ClutterGestureActionClass *klass)
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (ClutterGestureActionClass, gesture_end),
NULL, NULL,
_clutter_marshal_VOID__OBJECT,
NULL, NULL, NULL,
G_TYPE_NONE, 1,
CLUTTER_TYPE_ACTOR);
@ -827,8 +826,7 @@ clutter_gesture_action_class_init (ClutterGestureActionClass *klass)
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (ClutterGestureActionClass, gesture_cancel),
NULL, NULL,
_clutter_marshal_VOID__OBJECT,
NULL, NULL, NULL,
G_TYPE_NONE, 1,
CLUTTER_TYPE_ACTOR);
}

View File

@ -444,8 +444,7 @@ clutter_layout_manager_class_init (ClutterLayoutManagerClass *klass)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (ClutterLayoutManagerClass,
layout_changed),
NULL, NULL,
_clutter_marshal_VOID__VOID,
NULL, NULL, NULL,
G_TYPE_NONE, 0);
}

View File

@ -12,16 +12,12 @@ BOOLEAN:OBJECT,FLOAT,FLOAT
BOXED:UINT,UINT
DOUBLE:VOID
UINT:VOID
VOID:BOOLEAN
VOID:BOXED
VOID:BOXED,FLAGS
VOID:INT
VOID:INT64,INT64,FLOAT,BOOLEAN
VOID:INT,INT
VOID:INT,POINTER
VOID:FLOAT,FLOAT
VOID:INT,INT,INT,INT
VOID:OBJECT
VOID:OBJECT,FLAGS
VOID:OBJECT,FLAGS,UINT
VOID:OBJECT,FLOAT,FLOAT
@ -30,12 +26,9 @@ VOID:OBJECT,OBJECT
VOID:OBJECT,PARAM
VOID:OBJECT,POINTER
VOID:OBJECT,UINT
VOID:POINTER
VOID:STRING,BOOLEAN
VOID:STRING,BOOLEAN,BOOLEAN
VOID:STRING,INT
VOID:UINT
VOID:UINT,STRING,UINT
VOID:UINT,UINT
VOID:VOID
VOID:STRING,INT,POINTER

View File

@ -579,8 +579,7 @@ clutter_pan_action_class_init (ClutterPanActionClass *klass)
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (ClutterPanActionClass, pan_stopped),
NULL, NULL,
_clutter_marshal_VOID__OBJECT,
NULL, NULL, NULL,
G_TYPE_NONE, 1,
CLUTTER_TYPE_ACTOR);
}

View File

@ -134,8 +134,7 @@ clutter_stage_manager_class_init (ClutterStageManagerClass *klass)
G_OBJECT_CLASS_TYPE (gobject_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (ClutterStageManagerClass, stage_added),
NULL, NULL,
_clutter_marshal_VOID__OBJECT,
NULL, NULL, NULL,
G_TYPE_NONE, 1,
CLUTTER_TYPE_STAGE);
/**
@ -153,8 +152,7 @@ clutter_stage_manager_class_init (ClutterStageManagerClass *klass)
G_OBJECT_CLASS_TYPE (gobject_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (ClutterStageManagerClass, stage_removed),
NULL, NULL,
_clutter_marshal_VOID__OBJECT,
NULL, NULL, NULL,
G_TYPE_NONE, 1,
CLUTTER_TYPE_STAGE);
}

View File

@ -2078,8 +2078,7 @@ clutter_stage_class_init (ClutterStageClass *klass)
G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (ClutterStageClass, activate),
NULL, NULL,
_clutter_marshal_VOID__VOID,
NULL, NULL, NULL,
G_TYPE_NONE, 0);
/**
* ClutterStage::deactivate:
@ -2095,8 +2094,7 @@ clutter_stage_class_init (ClutterStageClass *klass)
G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (ClutterStageClass, deactivate),
NULL, NULL,
_clutter_marshal_VOID__VOID,
NULL, NULL, NULL,
G_TYPE_NONE, 0);
/**
@ -2164,8 +2162,7 @@ clutter_stage_class_init (ClutterStageClass *klass)
G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (ClutterStageClass, paint_view),
NULL, NULL,
_clutter_marshal_VOID__OBJECT,
NULL, NULL, NULL,
G_TYPE_NONE, 1,
CLUTTER_TYPE_STAGE_VIEW);

View File

@ -122,8 +122,7 @@ clutter_tap_action_class_init (ClutterTapActionClass *klass)
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (ClutterTapActionClass, tap),
NULL, NULL,
_clutter_marshal_VOID__OBJECT,
NULL, NULL, NULL,
G_TYPE_NONE, 1,
CLUTTER_TYPE_ACTOR);
}

View File

@ -4340,8 +4340,7 @@ clutter_text_class_init (ClutterTextClass *klass)
G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (ClutterTextClass, text_changed),
NULL, NULL,
_clutter_marshal_VOID__VOID,
NULL, NULL, NULL,
G_TYPE_NONE, 0);
/**
@ -4413,8 +4412,7 @@ clutter_text_class_init (ClutterTextClass *klass)
G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_LAST | G_SIGNAL_DEPRECATED,
G_STRUCT_OFFSET (ClutterTextClass, cursor_event),
NULL, NULL,
_clutter_marshal_VOID__BOXED,
NULL, NULL, NULL,
G_TYPE_NONE, 1,
CLUTTER_TYPE_GEOMETRY | G_SIGNAL_TYPE_STATIC_SCOPE);
@ -4432,8 +4430,7 @@ clutter_text_class_init (ClutterTextClass *klass)
G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (ClutterTextClass, cursor_changed),
NULL, NULL,
_clutter_marshal_VOID__VOID,
NULL, NULL, NULL,
G_TYPE_NONE, 0);
/**
@ -4451,8 +4448,7 @@ clutter_text_class_init (ClutterTextClass *klass)
G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (ClutterTextClass, activate),
NULL, NULL,
_clutter_marshal_VOID__VOID,
NULL, NULL, NULL,
G_TYPE_NONE, 0);
binding_pool = clutter_binding_pool_get_for_class (klass);

View File

@ -709,8 +709,7 @@ clutter_timeline_class_init (ClutterTimelineClass *klass)
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (ClutterTimelineClass, new_frame),
NULL, NULL,
_clutter_marshal_VOID__INT,
NULL, NULL, NULL,
G_TYPE_NONE,
1, G_TYPE_INT);
/**
@ -733,8 +732,7 @@ clutter_timeline_class_init (ClutterTimelineClass *klass)
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (ClutterTimelineClass, completed),
NULL, NULL,
_clutter_marshal_VOID__VOID,
NULL, NULL, NULL,
G_TYPE_NONE, 0);
/**
* ClutterTimeline::started:
@ -750,8 +748,7 @@ clutter_timeline_class_init (ClutterTimelineClass *klass)
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (ClutterTimelineClass, started),
NULL, NULL,
_clutter_marshal_VOID__VOID,
NULL, NULL, NULL,
G_TYPE_NONE, 0);
/**
* ClutterTimeline::paused:
@ -764,8 +761,7 @@ clutter_timeline_class_init (ClutterTimelineClass *klass)
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (ClutterTimelineClass, paused),
NULL, NULL,
_clutter_marshal_VOID__VOID,
NULL, NULL, NULL,
G_TYPE_NONE, 0);
/**
* ClutterTimeline::marker-reached:
@ -832,8 +828,7 @@ clutter_timeline_class_init (ClutterTimelineClass *klass)
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (ClutterTimelineClass, stopped),
NULL, NULL,
_clutter_marshal_VOID__BOOLEAN,
NULL, NULL, NULL,
G_TYPE_NONE, 1,
G_TYPE_BOOLEAN);
}

View File

@ -567,8 +567,7 @@ clutter_animation_class_init (ClutterAnimationClass *klass)
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (ClutterAnimationClass, started),
NULL, NULL,
_clutter_marshal_VOID__VOID,
NULL, NULL, NULL,
G_TYPE_NONE, 0);
/**
@ -589,8 +588,7 @@ clutter_animation_class_init (ClutterAnimationClass *klass)
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (ClutterAnimationClass, completed),
NULL, NULL,
_clutter_marshal_VOID__VOID,
NULL, NULL, NULL,
G_TYPE_NONE, 0);
}

View File

@ -258,8 +258,7 @@ clutter_behaviour_class_init (ClutterBehaviourClass *klass)
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (ClutterBehaviourClass, applied),
NULL, NULL,
_clutter_marshal_VOID__OBJECT,
NULL, NULL, NULL,
G_TYPE_NONE, 1,
CLUTTER_TYPE_ACTOR);
/**
@ -279,8 +278,7 @@ clutter_behaviour_class_init (ClutterBehaviourClass *klass)
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (ClutterBehaviourClass, removed),
NULL, NULL,
_clutter_marshal_VOID__OBJECT,
NULL, NULL, NULL,
G_TYPE_NONE, 1,
CLUTTER_TYPE_ACTOR);
}

View File

@ -1423,8 +1423,7 @@ clutter_state_class_init (ClutterStateClass *klass)
G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (ClutterStateClass, completed),
NULL, NULL,
_clutter_marshal_VOID__VOID,
NULL, NULL, NULL,
G_TYPE_NONE, 0);
/**

View File

@ -1166,8 +1166,7 @@ clutter_texture_class_init (ClutterTextureClass *klass)
G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (ClutterTextureClass, pixbuf_change),
NULL, NULL,
_clutter_marshal_VOID__VOID,
NULL, NULL, NULL,
G_TYPE_NONE,
0);
/**
@ -1188,8 +1187,7 @@ clutter_texture_class_init (ClutterTextureClass *klass)
G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (ClutterTextureClass, load_finished),
NULL, NULL,
_clutter_marshal_VOID__BOXED,
NULL, NULL, NULL,
G_TYPE_NONE,
1,
G_TYPE_ERROR);