mutter/tests/interactive
Emmanuele Bassi 2f445682b1 cairo-texture: Use signal-based drawing
The current "create context/draw/destroy context" pattern presents
various problems. The first issue is that it defers memory management to
the caller of the create() or create_region() methods, which makes
bookkeeping of the cairo_t* harder for language bindings and third party
libraries. The second issue is that, while it's easier for
draw-and-forget texturs, this API is needlessly complicated for contents
that have to change programmatically - and it introduces constraints
like calling the drawing code explicitly after a surface resize (e.g.
inside an allocate() implementation).

By using a signal-based approach we can make the CairoTexture actor
behave like other actors, and like other libraries using Cairo as their
2D drawing API.

The semantics of the newly-introduced ::draw signal are the same as the
one used by GTK+:

  - the signal is emitted on invalidation;
  - the cairo_t* context is owned by the actor;
  - it is safe to have multiple callbacks attached to the same
    signal, to allow composition;
  - the cairo_t* is already clipped to the invalidated area, so
    that Cairo can discard geometry immediately before we upload
    the texture data.

There are possible future improvements, like coalescing multiple
invalidations inside regions, and performing clipped draws during
the paint cycle; we could even perform clipped redraws if we know the
extent of the invalidated area.
2011-07-26 12:40:52 +01:00
..
Makefile.am cairo-texture: Use signal-based drawing 2011-07-26 12:40:52 +01:00
test-actor-clone.c tests: Check return value of clutter_init_with_args instead of error 2011-02-28 14:10:06 +00:00
test-actors.c tests: Check return value of clutter_init_with_args instead of error 2011-02-28 14:10:06 +00:00
test-animation.c tests: abort if clutter_init fails 2011-02-28 14:10:04 +00:00
test-animator.c tests: abort if clutter_init fails 2011-02-28 14:10:04 +00:00
test-behave.c tests: abort if clutter_init fails 2011-02-28 14:10:04 +00:00
test-bin-layout.c build: include <cairo.h> not <cairo/cairo.h> 2011-06-10 17:57:18 +01:00
test-binding-pool.c test-binding-pool: Remove usage of deprecated get_gid() 2011-05-31 11:57:18 +01:00
test-box-layout.c Fix include location for cogl-pango.h 2011-05-16 16:04:27 +01:00
test-cairo-clock.c cairo-texture: Use signal-based drawing 2011-07-26 12:40:52 +01:00
test-cairo-flowers.c tests: abort if clutter_init fails 2011-02-28 14:10:04 +00:00
test-clip.c tests: abort if clutter_init fails 2011-02-28 14:10:04 +00:00
test-cogl-multitexture.c tests: abort if clutter_init fails 2011-02-28 14:10:04 +00:00
test-cogl-offscreen.c tests: abort if clutter_init fails 2011-02-28 14:10:04 +00:00
test-cogl-point-sprites.c tests: abort if clutter_init fails 2011-02-28 14:10:04 +00:00
test-cogl-primitives.c tests: abort if clutter_init fails 2011-02-28 14:10:04 +00:00
test-cogl-shader-arbfp.c tests: abort if clutter_init fails 2011-02-28 14:10:04 +00:00
test-cogl-shader-glsl.c tests: abort if clutter_init fails 2011-02-28 14:10:04 +00:00
test-cogl-tex-convert.c tests: abort if clutter_init fails 2011-02-28 14:10:04 +00:00
test-cogl-tex-foreign.c tests: Dynamically resolve GL symbols 2011-07-19 16:06:06 +01:00
test-cogl-tex-getset.c tests: abort if clutter_init fails 2011-02-28 14:10:04 +00:00
test-cogl-tex-polygon.c tests: abort if clutter_init fails 2011-02-28 14:10:04 +00:00
test-cogl-tex-tile.c tests: abort if clutter_init fails 2011-02-28 14:10:04 +00:00
test-cogl-vertex-buffer.c tests: abort if clutter_init fails 2011-02-28 14:10:04 +00:00
test-constraints.c test-constrains: Use a ShaderEffect 2011-06-07 14:09:53 +01:00
test-depth.c tests: abort if clutter_init fails 2011-02-28 14:10:04 +00:00
test-devices.c tests: abort if clutter_init fails 2011-02-28 14:10:04 +00:00
test-drag.c tests: Check return value of clutter_init_with_args instead of error 2011-02-28 14:10:06 +00:00
test-drop.c Add ClutterDropAction 2011-06-20 15:25:53 +01:00
test-easing.c tests: abort if clutter_init fails 2011-02-28 14:10:04 +00:00
test-events.c stage: Make per-actor motion event delivery accessors public 2011-06-20 11:41:28 +01:00
test-fbo.c texture: Deprecate the new_from_actor() function 2011-07-08 12:08:19 +01:00
test-flow-layout.c build: include <cairo.h> not <cairo/cairo.h> 2011-06-10 17:57:18 +01:00
test-fullscreen.c tests: abort if clutter_init fails 2011-02-28 14:10:04 +00:00
test-grab.c stage: Make per-actor motion event delivery accessors public 2011-06-20 11:41:28 +01:00
test-layout.c tests: abort if clutter_init fails 2011-02-28 14:10:04 +00:00
test-main.c * tests/interactive/test-main.c (main): Allow more than two 2008-11-10 16:30:42 +00:00
test-model.c tests: abort if clutter_init fails 2011-02-28 14:10:04 +00:00
test-multistage.c tests: abort if clutter_init fails 2011-02-28 14:10:04 +00:00
test-paint-wrapper.c tests: Check return value of clutter_init_with_args instead of error 2011-02-28 14:10:06 +00:00
test-path-constraint.c tests: abort if clutter_init fails 2011-02-28 14:10:04 +00:00
test-pixmap.c Remove last dependency on the GdkPixbuf API 2011-05-06 15:44:13 +01:00
test-scale.c Remove usage of clutter_group_add() 2011-06-16 17:07:32 +01:00
test-script.c tests: abort if clutter_init fails 2011-02-28 14:10:04 +00:00
test-scrolling.c tests: abort if clutter_init fails 2011-02-28 14:10:04 +00:00
test-shader-effects.c tests: abort if clutter_init fails 2011-02-28 14:10:04 +00:00
test-shader.c Deprecate ClutterShader 2011-06-07 14:09:53 +01:00
test-snap-constraint.c tests: abort if clutter_init fails 2011-02-28 14:10:04 +00:00
test-stage-read-pixels.c tests: abort if clutter_init fails 2011-02-28 14:10:04 +00:00
test-stage-sizing.c tests: abort if clutter_init fails 2011-02-28 14:10:04 +00:00
test-state-animator.c tests: abort if clutter_init fails 2011-02-28 14:10:04 +00:00
test-state-script.c test-interactive: Add signal-based state transitions 2011-06-13 13:47:08 +01:00
test-state.c tests: abort if clutter_init fails 2011-02-28 14:10:04 +00:00
test-swipe-action.c test-swipe-action: Clean up the test code 2011-06-10 15:15:15 +01:00
test-table-layout.c Fix include location for cogl-pango.h 2011-05-16 16:04:27 +01:00
test-text-field.c tests: Add test for selected-text-color 2011-05-13 15:44:08 +01:00
test-text.c tests: Add test for selected-text-color 2011-05-13 15:44:08 +01:00
test-texture-async.c tests: abort if clutter_init fails 2011-02-28 14:10:04 +00:00
test-texture-material.c tests: abort if clutter_init fails 2011-02-28 14:10:04 +00:00
test-texture-quality.c tests: abort if clutter_init fails 2011-02-28 14:10:04 +00:00
test-textures.c tests: abort if clutter_init fails 2011-02-28 14:10:04 +00:00
test-threads.c tests: abort if clutter_init fails 2011-02-28 14:10:04 +00:00
test-unproject.c Remove usage of clutter_group_add() 2011-06-16 17:07:32 +01:00
wrapper.sh.in build: Allow to run the tests from any directory 2010-07-06 12:39:15 +01:00