Commit Graph

16 Commits

Author SHA1 Message Date
Robert Bragg
dae569b468 [debug] Adds a dump-pick-buffers CLUTTER_DEBUG option
Now if you export CLUTTER_DEBUG=dump-pick-buffers clutter will write out a
png, e.g.  pick-buffer-00000.png, each time _clutter_to_pick() is called.
It's a rather crude way to debug the picking (realtime visualization in a
second stage would probably be nicer) but it we've used this approach
successfully numerous times when debugging Clutter picking issues so it
makes sense to have a debug option for it.
2009-09-24 21:41:49 +01:00
Damien Lespiau
c9c87543e8 [debug] CLUTTER_{NOTE,MARK,DBG,GLERR,TIMESTAMP} should always be statements
In case someone tries to do:
	if (foo)
		CLUTTER_NOTE(DOMAIN, "%s", blah);

CLUTTER_NOTE () should always be a statement
2009-08-03 14:25:09 +01:00
Damien Lespiau
cd35f3b384 [debug] Fix __GNUC__ typo
The right gcc define is __GNUC__ not __GNUC_. This typo had the side
effect that we were using the non gcc specific debug macros leading to
a less optmised CLUTTER_NOTE () than one could have dreamed of.
2009-08-03 14:25:09 +01:00
Robert Bragg
26d5afd203 [debug] Adds a "nop-picking" clutter debug option to NOP _clutter_do_pick()
I've found this is something I do quite often when debugging rendering
problems since its a simple way to wipe out lots of geometry and removes a
lot of unpredictable noise when logging geometry passing through the Cogl
journal.
2009-06-29 23:49:06 +01:00
Emmanuele Bassi
709bb69970 Add debug annotations for the layout process
If we need to check that the layout sequence is correct in
terms of order of execution and with respect to caching, then
having a CLUTTER_DEBUG_LAYOUT debug flag would make things
easier.
2009-04-15 17:25:50 +01:00
Emmanuele Bassi
62844d5f04 2008-11-17 Emmanuele Bassi <ebassi@linux.intel.com>
Bug 1014 - Clutter Animation API Improvements

	* clutter/Makefile.am:
	* clutter/clutter.h: Update the build

	* clutter/clutter-types.h: Add AnimationMode, an enumeration
	for easing functions.

	* clutter/clutter-alpha.[ch]: Add the :mode property to
	control the function bound to an Alpha instance using an
	enumeration value. Also add six new alpha functions:

		- ease-in, ease-out, ease-in-out
		- sine-in, sine-out, sine-in-out

	* clutter/clutter-deprecated.h: Deprecate the #defines for
	the alpha functions. They will be replaced by entries in the
	ClutterAnimationMode.

	* clutter/clutter-interval.[ch]: Add ClutterInterval, an
	object for defining, validating and computing an interval
	between two values.

	* clutter/clutter-animation.[ch]: Add ClutterAnimation, an
	object responsible for animation the properties of a single
	actor along an interval of values. ClutterAnimation memory
	management is automatic. A simple wrapper method for
	ClutterActor is provided:

		clutter_actor_animate()

	which will create, or update, an animation for the passed
	actor.

	* clutter/clutter-debug.h:
	* clutter/clutter-main.c: Add a new 'animation' debug note.

	* clutter/clutter-script.c: Clean up the alpha functions
	whitelist, and add the new functions.

	* doc/reference/clutter/Makefile.am:
	* doc/reference/clutter/clutter-sections.txt: Update the
	API reference.

	* doc/reference/clutter/clutter-animation.xml: Renamed to
	doc/reference/clutter/clutter-animation-tutorial.xml to
	avoid clashes with the ClutterAnimation section.

	* doc/reference/clutter/clutter-docs.sgml: Renamed to
	doc/reference/clutter/clutter-docs.xml, as it was an XML
	file and not a SGML file.

	* tests/Makefile.am:
	* tests/interactive/Makefile.am:
	* tests/interactive/test-animation.c:
	* tests/interactive/test-easing.c: Add two tests for the
	new simple animation API and the easing functions.

	* tests/interactive/test-actors.c:
	* tests/interactive/test-behave.c:
	* tests/interactive/test-depth.c:
	* tests/interactive/test-effects.c:
	* tests/interactive/test-layout.c:
	* tests/interactive/test-multistage.c:
	* tests/interactive/test-paint-wrapper.c:
	* tests/interactive/test-rotate.c:
	* tests/interactive/test-scale.c:
	* tests/interactive/test-texture-quality.c:
	* tests/interactive/test-threads.c:
	* tests/interactive/test-viewport.c: Update interactive tests
	to the deprecations and new alpha API.
2008-11-18 09:50:03 +00:00
Matthew Allum
8847bcd195 2008-03-28 Matthew Allum <mallum@openedhand.com>
* clutter/Makefile.am:
        * clutter/clutter-actor.c:
        * clutter/clutter-actor.h:
        * clutter/clutter-backend.c:
        * clutter/clutter-backend.h:
        * clutter/clutter-debug.h:
        * clutter/clutter-event.c:
        * clutter/clutter-event.h:
        * clutter/clutter-feature.h:
        * clutter/clutter-group.h:
        * clutter/clutter-main.c:
        * clutter/clutter-main.h:
        * clutter/clutter-private.h:
        * clutter/clutter-stage.c:
        * clutter/clutter-stage.h:
        * clutter/clutter-stage-manager.c
        * clutter/clutter-stage-manager.h
        * clutter/clutter-types.h:
        * clutter/glx/clutter-backend-glx.c:
        * clutter/glx/clutter-backend-glx.h:
        * clutter/glx/clutter-stage-glx.c:
        * clutter/glx/clutter-stage-glx.h:
        * clutter/x11/clutter-backend-x11.c:
        * clutter/x11/clutter-backend-x11.h:
        * clutter/x11/clutter-event-x11.c:
        * clutter/x11/clutter-stage-x11.c:
        * clutter/x11/clutter-x11.h:
        * tests/Makefile.am:
        * tests/test-multistage.c:
        Initial commit of multi stage support (mostly a merge from the
        clutter-multistage branch).
        Note, this commit will break all backends except glx.
2008-03-28 22:50:55 +00:00
Emmanuele Bassi
4ff25a291c 2007-12-05 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-score.h: Rearrange declarations.

	* clutter/clutter-score.c: More documentation in the long
	description of the ClutterScore section.

	* clutter/clutter-debug.h:
	* clutter/clutter-main.c: Add the CLUTTER_DEBUG_SHADER flag,
	for debugging the shader calls.

	* clutter/clutter-feature.h: Fix the documentation of the
	feature flags.

	* clutter/Makefile.am: Remove trailing whitespace.
2007-12-05 21:15:19 +00:00
Tomas Frydrych
174bd04b49 2007-10-12 Tomas Frydrych <tf@o-hand.com>
Portability fixes:

	* clutter/clutter-private.h:
	Bracket #include "unistd.h" with #ifdef HAVE_UNISTD_H

	* clutter/clutter-fixed.c:
	Use "", not <> for inclusion of local files.

	(clutter_sqrtx): forward declare local variables.

	* clutter/clutter-debug.h:
	Added non-gcc (c99) implementation of variadic debug macros for
	when not compiling with gcc.

	* clutter/pango/pangoclutter-render.c:
	Fixed some strange uses of CLUTTER_NOTE() + stripped trailing
	whitespace.
2007-10-12 09:39:41 +00:00
Emmanuele Bassi
991562f536 2007-10-08 Emmanuele Bassi <ebassi@openedhand.com>
Initial implementation of the UI definition files. (#424)

	* clutter/json/Makefile.am:
	* clutter/json/*.[ch]: In-tree copy of JSON-GLib, a GLib-based
	JSON parser/generator library. We use it in-tree because we might
	need to change the API. Ideally, we'd depend on it.

	* clutter/clutter.h:
	* clutter/clutter-script-private.h:
	* clutter/clutter-script.[ch]: ClutterScript, the scenegraph
	generator class. It parses JSON streams in form of buffers and
	files and builds the scene.

	* clutter/clutter-debug.h:
	* clutter/clutter-main.c: Add a "script" debug flag

	* clutter/Makefile.am: Build glue.

	* tests/Makefile.am:
	* tests/test-script.c: Add a test case for the ClutterScript.

	* configure.ac: Depend on GLib 2.14, so we can use the
	g_hash_table_get_key() and g_hash_table_get_values() functions
	for the time being; we can probably reimplement those, but we
	are going to need 2.14 anyway if we are going to implement a
	list model using GSequence.
2007-10-08 15:03:22 +00:00
Matthew Allum
2c40b4b53d 2007-06-08 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-actor.c:
        * clutter/clutter-debug.h:
        * clutter/clutter-main.c:
        * clutter/clutter-main.h:
        * clutter/clutter-private.h:
        * clutter/clutter-timeline.c:
        Add 'schedule' debug flag and new CLUTTER_TIMESTAMP macro.

        * clutter/clutter-texture.c:
        * clutter/clutter-texture.h:
        * clutter/cogl/cogl.h:
        * clutter/cogl/gl/cogl-defines.h:
        * clutter/cogl/gles/cogl-defines.h:
        * clutter/cogl/gl/cogl.c:
        * clutter/cogl/gles/cogl.c:
        Add initial experiemental YUV texture support.
        Move texture rect size checks into cogl.
        Better handle moving texture data from video -> system memory
        (if support available).
2007-06-07 23:51:53 +00:00
Matthew Allum
866e4ed0dd 2007-04-28 Matthew Allum <mallum@openedhand.com>
* clutter/Makefile.am:
        * clutter/clutter-debug.h:
        * clutter/clutter-fixed.h:
        * clutter/clutter-main.c:
        * clutter/cogl/gles/Makefile.am:
        * clutter/cogl/gles/cogl-defines.h:
        * clutter/cogl/gles/cogl.c:
        * clutter/egl/clutter-backend-egl.c:
        * clutter/egl/clutter-backend-egl.h:
        * clutter/egl/clutter-stage-egl.c:
        * configure.ac:
        Populate most stubs for cogl GL/ES implementation.
        (against vincent - see http://svn.o-hand.com/repos/misc/ogles)
        Add various fixups to EGL backend.
        Code builds and runs (on 16bpp) but yet displays much (is close!)

        * clutter/pango/pangoclutter-render.c:
        comment out some rouge glBegin/end calls.
2007-04-28 00:37:11 +00:00
Emmanuele Bassi
e2ee1249ee 2007-02-07 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-debug.h: Define the CLUTTER_MARK()
	macro even when CLUTTER_ENABLE_DEBUG is not
	defined. (#215)
2007-02-07 11:03:54 +00:00
Matthew Allum
382edccf6d 2006-11-23 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-debug.h:
        Fix small macro typo.
2006-11-23 21:36:45 +00:00
Matthew Allum
c57108e030 2006-11-22 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-actor.c:
        * clutter/clutter-alpha.c:
        * clutter/clutter-behaviour-opacity.c:
        * clutter/clutter-behaviour-scale.c:
        * clutter/clutter-clone-texture.c:
        * clutter/clutter-feature.c:
        * clutter/clutter-label.c:
        * clutter/clutter-main.c:
        * clutter/clutter-stage.c:
        * clutter/clutter-texture.c
        * clutter/clutter-timeline.c:
        * clutter/clutter-debug.h:
        Make CLUTTER_NOTE() just take a string rather than a func.
        Add more default context to output.

        * configure.ac:
        Fix flag and add more help docs for --ebable-debug option.
2006-11-22 20:52:27 +00:00
Emmanuele Bassi
e4b9a507e3 2006-11-21 Emmanuele Bassi <ebassi@openedhand.com>
* configure.ac: Enable debug messages also when
	--enable-debug is set to "minimum".

	* clutter/Makefile.am:
	* clutter/clutter-debug.h: Move all debugging macros inside
	this private header; make all debug macros depend on the
	CLUTTER_ENABLE_DEBUG compile time define, controlled by
	the --enable-debug configure switch; add G_LOG_DOMAIN define.

	* clutter/clutter-main.c: Clean up the debug stuff; add
	command line argument parsing using GOption; the debug
	messages now are triggered like this:

	  CLUTTER_DEBUG=section:section:... clutter-app
	
	or like this:

	  clutter-app --clutter-debug=section:section:...
	
	where "section" is one of the sections listed in clutter-main.c,
	or "all", for all sections; each section is bound to a flag,
	which can be used to define a domain when adding a debug note
	using the CLUTTER_NOTE() macro; the old CLUTTER_DBG() macro is
	just a wrapper around that, under the CLUTTER_DEBUG_MISC domain;
	CLUTTER_NOTE() is used like this:

	  CLUTTER_NOTE (DOMAIN, log-function);
	
	where log function is g_printerr(), g_message(), g_warning(),
	g_critical() or directly g_log() - for instance:

	  CLUTTER_NOTE (PANGO, g_warning ("Cache miss: %d", glyph));

	will print the warning only if the "pango" flag has been
	set to the CLUTTER_DEBUG envvar or passed to the --clutter-debug
	command line argument.

	similar to CLUTTER_SHOW_FPS, there's also the --clutter-show-fps
	command line switch; also, the --display and --screen command
	line switches have been added: the first overrides the DISPLAY
	envvar and the second controls the X screen used by Clutter to
	get the root window on the display.

	* clutter/clutter-main.h:
	* clutter/clutter-main.c: Add extended support for GOption
	in Clutter; use clutter_init_with_args() to let Clutter
	parse your own command line arguments; use instead
	clutter_get_option_group() to get the GOptionGroup used by
	Clutter if you want to do the parsing yourself with
	g_option_context_parse(). The init sequence has been verified,
	updated and moved into common functions where possible.

	* clutter/pango/pangoclutter-render.c:
	* clutter/*.c: Include "clutter-debug.h" where needed; use
	CLUTTER_NOTE() instead of CLUTTER_DBG().

	* examples/super-oh.c: Use the new clutter_init_with_args()
	function, and add a --num-hands command line switch to
	the SuperOH example code controlling the number of hands at
	runtime.
2006-11-21 21:27:53 +00:00