GNOME Bugzilla – Bug 647876
Make the pick id pool a per-Stage resource
Last modified: 2011-05-06 16:49:13 UTC
The pick id should be associated to the stage that does the actual picking; the id should also not be exposed, given that it's an implementation detail of the picking machinery.
Created attachment 186029 [details] [review] Deprecate actor id The actor's id, which is currently used to generate the pick color, should not be part of the public API: it's an internal detail of the pick implementation, and having it exposed is like punching a hole through the abstraction. http://bugzilla.clutter-project.org/show_bug.cgi?id=2633
Created attachment 186030 [details] [review] Make the pick id pool per Stage The id pool used for the actor's id should be a per-stage field. At some point, we might have a Stage mapped to multiple framebuffers, or each Stage mapped to a different framebuffer; also, on backend with low color precision we don't want to exhaust the size of the available ids with a global pool. Finally, it's yet another thing we can remove from the global Clutter context. Having the id pool allocated per-stage, and the pick id assigned on Actor:mapped will make the whole pick-id more reliable and future proof. http://bugzilla.clutter-project.org/show_bug.cgi?id=2633
Review of attachment 186030 [details] [review]: ::: clutter/clutter-actor.c @@ +2676,3 @@ _clutter_actor_get_pick_id (ClutterActor *self) { + if (self->priv->pick_id < 0) I wonder if we should just assert() here, since it would imply that we're picking an unmapped/unparented actor.
both attachments have been pushed to master.