From 74c8271db64d81915cea6d3cb5d51516779b99e4 Mon Sep 17 00:00:00 2001 From: Matthew Allum Date: Sun, 9 Mar 2008 19:07:17 +0000 Subject: [PATCH] 2008-03-09 Matthew Allum * clutter/clutter-id-pool.c: (clutter_id_pool_free): Use g_slice_free not g_free. * clutter/clutter-main.c: (_clutter_do_pick): Dont 'over read' the framebuffer when picking (#839, Neil Roberts) --- ChangeLog | 34 ++++++++++++++++++++++++---------- clutter/clutter-id-pool.c | 5 +++-- clutter/clutter-main.c | 2 +- 3 files changed, 28 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 78ac9ae..9ff204c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-03-09 Matthew Allum + + * clutter/clutter-id-pool.c: (clutter_id_pool_free): + Use g_slice_free not g_free. + * clutter/clutter-main.c: (_clutter_do_pick): + Dont 'over read' the framebuffer when picking (#839, Neil Roberts) + 2008-03-07 Øyvind Kolås Refactored the integer id->ClutterActor mapping code to be a self @@ -15,24 +22,31 @@ * clutter/clutter-timeline.c: Timeline changes to fix the issues identified in bugzilla #439 - Notably, this includes some tweaks to timeline semantics. So e.g. for a + Notably, this includes some tweaks to timeline semantics. + So e.g. for a + 10 frame timeline here are some points about the new timeline code: + - When you create a timeline it starts with current_frame_num == 0 + - After starting a timeline, the first timeout is for current_frame_num == 1 (Notably it isn't 0 since there is a delay before the first timeout signals so re-asserting the starting point would give a longer than average first frame.) + - For a non looping timeline the last timeout would be for current_frame_num == 10 - - For a looping timeline the timeout for current_frame_num == 10 would - be followed by a timeout for current_frame_num == 1 and frame 0 is - considered == frame 10. - - Asking for a timeline of N frames might better be described as asking - for a timeline of _length_ N. - - Warning: Although I tried to test things, I guess it's quite likely that - this breaks somthing depending on a specific quirk of the previous - timeline code. + + - For a looping timeline the timeout for current_frame_num == + 10 would be followed by a timeout for current_frame_num == 1 + and frame 0 is considered == frame 10. + + - Asking for a timeline of N frames might better be described + as asking for a timeline of _length_ N. + + Warning: Although I tried to test things, I guess it's quite + likely that this breaks somthing depending on a specific quirk + of the previous timeline code. 2008-03-06 Emmanuele Bassi diff --git a/clutter/clutter-id-pool.c b/clutter/clutter-id-pool.c index fc47888..b383e4b 100644 --- a/clutter/clutter-id-pool.c +++ b/clutter/clutter-id-pool.c @@ -48,7 +48,8 @@ clutter_id_pool_new (guint initial_size) self = g_slice_new (ClutterIDPool); - self->array = g_array_sized_new (FALSE, FALSE, sizeof (gpointer), initial_size); + self->array = g_array_sized_new (FALSE, FALSE, + sizeof (gpointer), initial_size); self->free_ids = NULL; return self; } @@ -60,7 +61,7 @@ clutter_id_pool_free (ClutterIDPool *id_pool) g_array_free (id_pool->array, TRUE); g_slist_free (id_pool->free_ids); - g_free (id_pool); + g_slice_free (ClutterIDPool, id_pool); } guint32 diff --git a/clutter/clutter-main.c b/clutter/clutter-main.c index 10eeba0..a0283ff 100644 --- a/clutter/clutter-main.c +++ b/clutter/clutter-main.c @@ -256,7 +256,7 @@ _clutter_do_pick (ClutterStage *stage, /* glEnable (GL_DITHER); we never enabled this originally, so its probably not safe to then enable it */ - glReadPixels(x, viewport[3] - y, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, pixel); + glReadPixels(x, viewport[3] - y -1, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, pixel); if (pixel[0] == 0xff && pixel[1] == 0xff && pixel[2] == 0xff) return CLUTTER_ACTOR (stage); -- 2.7.4