mirror of
https://github.com/brl/mutter.git
synced 2024-11-27 02:20:43 -05:00
c3d9f0bed4
The cogl_is_* functions were showing up quite high on profiles due to iterating through arrays of cogl handles. This does away with all the handle arrays and implements a simple struct inheritance scheme. All cogl objects now add a CoglHandleObject _parent; member to their main structures. The base object includes 2 members a.t.m; a ref_count, and a klass pointer. The klass in turn gives you a type and virtual function for freeing objects of that type. Each handle type has a _cogl_##handle_type##_get_type () function automatically defined which returns a GQuark of the handle type, so now implementing the cogl_is_* funcs is just a case of comparing with obj->klass->type. Another outcome of the re-work is that cogl_handle_{ref,unref} are also much more efficient, and no longer need extending for each handle type added to cogl. The cogl_##handle_type##_{ref,unref} functions are now deprecated and are no longer used internally to Clutter or Cogl. Potentially we can remove them completely before 1.0. |
||
---|---|---|
.. | ||
ADDING_NEW_TESTS | ||
Makefile.am | ||
test-actor-invariants.c | ||
test-anchors.c | ||
test-backface-culling.c | ||
test-binding-pool.c | ||
test-clutter-fixed.c | ||
test-clutter-rectangle.c | ||
test-clutter-text.c | ||
test-conform-common.c | ||
test-conform-common.h | ||
test-conform-main.c | ||
test-launcher.sh | ||
test-model.c | ||
test-npot-texture.c | ||
test-paint-opacity.c | ||
test-path.c | ||
test-pick.c | ||
test-text-cache.c | ||
test-timeline-dup-frames.c | ||
test-timeline-interpolate.c | ||
test-timeline-rewind.c | ||
test-timeline-smoothness.c | ||
test-timeline.c | ||
test-vertex-buffer-contiguous.c | ||
test-vertex-buffer-interleved.c | ||
test-vertex-buffer-mutability.c |