Nobody has been compiling Clutter with profiling enabled in a long time.
UProf itself hasn't been updated in 5 years, and it still depends on
deprecated components like dbus-glib, with no port to GDBus in sight.
The profiling code was moderately useful in the past, but these days
it's probably better to profile Cogl than Clutter itself; timing
information can be extracted by the timestamp on each diagnostic message
that is now available by default in the CLUTTER_NOTE macro, and we can
add ad hoc counters where needed.
clutter_stage_set_paint_callback() has the disadvantage that it only
works for a single caller, and subsequent callers will overwrite and
break previous callers. Replace it with an ::after-paint signal that is
emitted at the same point - after all painting for the stage is
completed but before the drawing is presented to the screen.
https://bugzilla.gnome.org/show_bug.cgi?id=732342
Add back some deprecated and general purpose API tests. These are the
ones that were written already pretty much conforming to the GTest API
and style, and thus require minimal porting.
The current conformance test suite is suboptimal in many ways.
All tests are built into the same binary, which makes adding new tests,
builting tests, and running groups of tests much more awkward than it
needs to be. The first issue, especially, raises the bar of contribution
in a significant way, while the other two take their toll on the
maintainer. All of these changes were introduced back when we had both
Clutter and Cogl tests in tree, and because we were building the test
suite for every single change; since then, Cogl moved out of tree with
all its tests, and we build the conformance test suite only when running
the `check` make target.
This admittedly large-ish commit changes the way the conformance test
suite works, taking advantage of the changes in the GTest API and test
harness.
First of all, all tests are now built separately, using their own test
suite as defined by each separate file. All tests run under the TAP
harness provided by GTest and Automake, to gather a proper report using
the Test Anything Protocol without using the `gtester` harness and the
`gtester-report` script. We also use the Makefile rules provided by GLib
to vastly simplify the build environment for the conformance test suite.
On top of the changes for the build and harness, we also provide new API
for creating and running test suites for Clutter. The API is public,
because the test suite has to use it, but it's minimal and mostly
provides convenience wrappers around GTest that make writing test units
for Clutter easier.
This commit disables all tests in the conformance test suite, as well as
moving the data files outside of the tests/data directory; the next few
commits will re-establish the conformance test suite separately so we
can check that everything works in a reliable way.
I don't want to remove them altogether, but they need to be ported to a
more reliable system, otherwise they end up failing at random depending
on the whims of the compositor and the windowing system.
The timeline base test unit is pretty slow, and under heavy load it will
tend to fail because of skipped frames. We should put it under
conditional testing and only run it if `-m slow` is passed to the test
harness.
Timeouts and idles are subject to the whims of the load of the machine
running the tests, as we found out with the new installed tests and
OSTree-based VM running the conformance test suite continuously.
We should be able to use a repaint function and a blocking loop that
either is terminated because we hit g_assert(), or because a flag gets
toggled once we know that the Stage has been at least painted once.
The currently enabled tests using clutter_stage_read_pixels() have been
updated to this approach.
https://bugzilla.gnome.org/show_bug.cgi?id=703476
If we don't have support for offscreen buffers, then there's no point in
testing FBO support in ClutterTexture — a feature that has been long
since deprecated, on a deprecated class.
This reverts commit 2b4f47d444.
These are presently "examples" (because they're just run
interactively, not automatable tests).
Conflicts:
tests/accessibility/Makefile.am
Being able to set a marker at a normalized point on a timeline, instead
of using a specific time, is a nice fit with the current Timeline class
API.
https://bugzilla.gnome.org/show_bug.cgi?id=694319
The behaviour imitates GtkEntry and ignores attributes from markup because Pango
barfs on invalid markup. Also add an example to the text-field interactive test.
https://bugzilla.gnome.org/show_bug.cgi?id=686477
When setting an explicit transform with clutter_actor_set_transform()
and a non (0,0) pivot-point, clutter_actor_apply_transform() will fail
to roll back the pivot-point translation done before multiplying the
transformation matrix due to the "out:" label being slightly misplaced
in clutter_actor_real_apply_transform().
This works properly:
clutter_actor_set_pivot_point (actor, 0.5, 0.5);
clutter_actor_set_rotation_angle (actor, CLUTTER_Z_AXIS, 30);
This results in the actor being moved to the pivot-point position:
clutter_actor_set_pivot_point (actor, 0.5, 0.5);
clutter_matrix_init_identity(&matrix);
cogl_matrix_rotate (&matrix, 30, 0, 0, 1.0);
clutter_actor_set_transform (actor, &matrix);
This also add a conformance test checking that even when using a
pivot-point, no matter how a rotation is set the resulting
transformation matrix will be the same.
https://bugzilla.gnome.org/show_bug.cgi?id=690214