gdk: Improve struct packing in places
Plug some holes in our structs by rearranging a few fields. This is was done looking at pahole output.
This commit is contained in:
@@ -68,6 +68,7 @@ struct _GdkContentDeserializer
|
||||
GValue value;
|
||||
GInputStream *stream;
|
||||
int priority;
|
||||
gboolean returned;
|
||||
GCancellable *cancellable;
|
||||
gpointer user_data;
|
||||
GAsyncReadyCallback callback;
|
||||
@@ -77,7 +78,6 @@ struct _GdkContentDeserializer
|
||||
GDestroyNotify task_notify;
|
||||
|
||||
GError *error;
|
||||
gboolean returned;
|
||||
};
|
||||
|
||||
struct _GdkContentDeserializerClass
|
||||
|
||||
@@ -70,6 +70,7 @@ struct _GdkContentSerializer
|
||||
GValue value;
|
||||
GOutputStream *stream;
|
||||
int priority;
|
||||
gboolean returned;
|
||||
GCancellable *cancellable;
|
||||
gpointer user_data;
|
||||
GAsyncReadyCallback callback;
|
||||
@@ -79,7 +80,6 @@ struct _GdkContentSerializer
|
||||
GDestroyNotify task_notify;
|
||||
|
||||
GError *error;
|
||||
gboolean returned;
|
||||
};
|
||||
|
||||
struct _GdkContentSerializerClass
|
||||
|
||||
@@ -40,13 +40,13 @@ struct _GdkDevice
|
||||
GdkInputSource source;
|
||||
gboolean has_cursor;
|
||||
GdkAxisFlags axis_flags;
|
||||
GdkDeviceType type;
|
||||
GdkDisplay *display;
|
||||
/* The paired logical device for logical devices,
|
||||
* or the associated logical device for physical ones
|
||||
*/
|
||||
GdkDevice *associated;
|
||||
GList *physical_devices;
|
||||
GdkDeviceType type;
|
||||
GArray *axes;
|
||||
guint num_touches;
|
||||
|
||||
|
||||
@@ -48,8 +48,6 @@ struct _GdkSurface
|
||||
int x;
|
||||
int y;
|
||||
|
||||
guint8 resize_count;
|
||||
|
||||
GdkGLContext *gl_paint_context;
|
||||
|
||||
cairo_region_t *update_area;
|
||||
@@ -63,16 +61,17 @@ struct _GdkSurface
|
||||
GdkSurfaceState old_state;
|
||||
GdkSurfaceState state;
|
||||
|
||||
guint8 resize_count;
|
||||
|
||||
guint8 alpha;
|
||||
guint8 fullscreen_mode;
|
||||
|
||||
guint modal_hint : 1;
|
||||
|
||||
guint destroyed : 2;
|
||||
|
||||
guint in_update : 1;
|
||||
guint frame_clock_events_paused : 1;
|
||||
guint autohide : 1;
|
||||
guint shortcuts_inhibited : 1;
|
||||
|
||||
struct {
|
||||
GdkGravity surface_anchor;
|
||||
@@ -101,7 +100,6 @@ struct _GdkSurface
|
||||
|
||||
cairo_region_t *opaque_region;
|
||||
|
||||
guint shortcuts_inhibited : 1;
|
||||
GdkSeat *current_shortcuts_inhibited_seat;
|
||||
};
|
||||
|
||||
|
||||
@@ -55,8 +55,8 @@ typedef struct _DirectionCacheEntry DirectionCacheEntry;
|
||||
struct _DirectionCacheEntry
|
||||
{
|
||||
guint serial;
|
||||
Atom group_atom;
|
||||
PangoDirection direction;
|
||||
Atom group_atom;
|
||||
};
|
||||
|
||||
struct _GdkX11Keymap
|
||||
|
||||
Reference in New Issue
Block a user