2008-03-09 Matthew Allum <mallum@openedhand.com>

* 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)
This commit is contained in:
Matthew Allum 2008-03-09 19:07:17 +00:00
parent f72930f35e
commit 74c8271db6
3 changed files with 27 additions and 12 deletions

View File

@ -1,3 +1,10 @@
2008-03-09 Matthew Allum <mallum@openedhand.com>
* 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 <pippin@o-hand.com> 2008-03-07 Øyvind Kolås <pippin@o-hand.com>
Refactored the integer id->ClutterActor mapping code to be a self Refactored the integer id->ClutterActor mapping code to be a self
@ -15,24 +22,31 @@
* clutter/clutter-timeline.c: * clutter/clutter-timeline.c:
Timeline changes to fix the issues identified in bugzilla #439 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: 10 frame timeline here are some points about the new timeline code:
- When you create a timeline it starts with current_frame_num == 0 - When you create a timeline it starts with current_frame_num == 0
- After starting a timeline, the first timeout is for - After starting a timeline, the first timeout is for
current_frame_num == 1 (Notably it isn't 0 since there is a delay 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 before the first timeout signals so re-asserting the starting point
would give a longer than average first frame.) would give a longer than average first frame.)
- For a non looping timeline the last timeout would be for - For a non looping timeline the last timeout would be for
current_frame_num == 10 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 - For a looping timeline the timeout for current_frame_num ==
this breaks somthing depending on a specific quirk of the previous 10 would be followed by a timeout for current_frame_num == 1
timeline code. 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 <ebassi@openedhand.com> 2008-03-06 Emmanuele Bassi <ebassi@openedhand.com>

View File

@ -48,7 +48,8 @@ clutter_id_pool_new (guint initial_size)
self = g_slice_new (ClutterIDPool); 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; self->free_ids = NULL;
return self; return self;
} }
@ -60,7 +61,7 @@ clutter_id_pool_free (ClutterIDPool *id_pool)
g_array_free (id_pool->array, TRUE); g_array_free (id_pool->array, TRUE);
g_slist_free (id_pool->free_ids); g_slist_free (id_pool->free_ids);
g_free (id_pool); g_slice_free (ClutterIDPool, id_pool);
} }
guint32 guint32

View File

@ -256,7 +256,7 @@ _clutter_do_pick (ClutterStage *stage,
/* glEnable (GL_DITHER); we never enabled this originally, so its /* glEnable (GL_DITHER); we never enabled this originally, so its
probably not safe to then enable it */ 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) if (pixel[0] == 0xff && pixel[1] == 0xff && pixel[2] == 0xff)
return CLUTTER_ACTOR (stage); return CLUTTER_ACTOR (stage);