mutter/tests/conform
Emmanuele Bassi 83b4ec7a12 units: Cache the pixels value inside Units
When computing the pixels value of a ClutterUnits value we should
be caching the value to avoid recomputing for every call of
clutter_units_to_pixels(). We already have a flag telling us to
return the cached value, but we miss the mechanism to evict the
cache whenever the Backend settings affecting the conversion, that
is default font and resolution, change.

In order to implement the eviction we can use a "serial"; the
Backend will have an internal serial field which we retrieve and
put inside the ClutterUnits structure (we split one of the two
64 bit padding fields into two 32 bit fields to maintain ABI); every
time we call clutter_units_to_pixels() we compare the units serial
with that of the Backend; if they match and pixels_set is set to
TRUE then we just return the stored pixels value. If the serials
do not match then we unset the pixels_set flag and recompute the
pixels value.

We can verify this by adding a simple test unit checking that
by changing the resolution of ClutterBackend we get different
pixel values for 1 em.

http://bugzilla.openedhand.com/show_bug.cgi?id=1843
2009-10-16 15:25:37 +01:00
..
ADDING_NEW_TESTS * tests/conform/ADDING_NEW_TESTS 2008-11-10 18:52:50 +00:00
Makefile.am [build] Split out the custom silent rules 2009-09-16 17:47:59 +01:00
test-actor-invariants.c [tests] Add unit for Clone behaviour 2009-06-15 11:29:37 +01:00
test-actor-size.c [tests] Add preferred size conformance test unit 2009-09-15 11:27:50 +01:00
test-anchors.c Remove usage of Units and macros 2009-06-04 16:30:30 +01:00
test-backface-culling.c [cogl] Move the texture filters to be a property of the material layer 2009-06-04 19:03:40 +01:00
test-binding-pool.c Remove usage of Units and macros 2009-06-04 16:30:30 +01:00
test-blend-strings.c [cogl] Adds cogl_read_pixels to replace direct use of glReadPixels 2009-06-29 23:49:06 +01:00
test-clutter-fixed.c [tests] Test CoglFixed, not ClutterFixed 2009-03-10 12:38:03 +00:00
test-clutter-rectangle.c Disable single header inclusion for GLib 2009-06-15 11:29:37 +01:00
test-clutter-text.c [tests] Add unit for the ClutterText:password-char property 2009-01-06 15:30:31 +00:00
test-clutter-units.c units: Cache the pixels value inside Units 2009-10-16 15:25:37 +01:00
test-color.c [color] allow alpha to be omitted when converting to color from string 2009-10-07 12:56:01 +01:00
test-conform-common.c * tests/conform/ADDING_NEW_TESTS 2008-11-10 18:52:50 +00:00
test-conform-common.h Add int dummy; to empty struct TestConformSimpleFixture definition. 2009-07-28 12:13:43 +01:00
test-conform-main.c units: Cache the pixels value inside Units 2009-10-16 15:25:37 +01:00
test-group.c [tests] Add a Group actor unit 2009-08-25 17:57:22 +01:00
test-launcher.sh [tests] Ensure that test-launcher.sh is found for out of tree builds 2008-12-21 14:07:22 +00:00
test-materials.c [cogl] Ensure well defined semantics for COGL_INVALID_HANDLE material layers 2009-06-30 17:35:07 +01:00
test-model.c [tests] Exercise the Model filtering 2009-04-29 15:39:23 +01:00
test-npot-texture.c [cogl] Remove max_waste argument from Texture ctors 2009-05-23 19:35:19 +01:00
test-paint-opacity.c Update the paint opacity unit test 2008-12-11 12:26:47 +00:00
test-path.c Merge branch 'cairo-texture' 2008-12-19 16:44:40 +00:00
test-pick.c Allow passing the pick mode to get_actor_at_pos() 2009-04-24 15:25:58 +01:00
test-premult.c [cogl] Adds cogl_read_pixels to replace direct use of glReadPixels 2009-06-29 23:49:06 +01:00
test-text-cache.c Change the paint forcing on the Text cache text 2009-06-11 12:23:09 +01:00
test-timeline-interpolate.c Revert "[timeline] Don't clamp the elapsed time when a looping tl reaches the end" 2009-06-11 11:46:41 +01:00
test-timeline-rewind.c [tests] Don't add a newline to the end of g_test_message calls 2009-06-11 11:38:49 +01:00
test-timeline.c [test-timeline] Add a marker at the beginning of the timeline 2009-06-11 11:32:41 +01:00
test-vertex-buffer-contiguous.c [cogl] Adds cogl_read_pixels to replace direct use of glReadPixels 2009-06-29 23:49:06 +01:00
test-vertex-buffer-interleved.c [cogl] Adds cogl_read_pixels to replace direct use of glReadPixels 2009-06-29 23:49:06 +01:00
test-vertex-buffer-mutability.c [cogl] Adds cogl_read_pixels to replace direct use of glReadPixels 2009-06-29 23:49:06 +01:00