mutter/tests/interactive
Owen W. Taylor c3448314d5 Default to a blend function that expects premultiplied colors
Many operations, like mixing two textures together or alpha-blending
onto a destination with alpha, are done most logically if texture data
is in premultiplied form. We also have many sources of premultiplied
texture data, like X pixmaps, FBOs, cairo surfaces. Rather than trying
to work with two different types of texture data, simplify things by
always premultiplying texture data before uploading to GL.

Because the default blend function is changed to accommodate this,
uses of pure-color CoglMaterial need to be adapted to add
premultiplication.

gl/cogl-texture.c gles/cogl-texture.c: Always premultiply
  non-premultiplied texture data before uploading to GL.

cogl-material.c cogl-material.h: Switch the default blend functions
  to ONE, ONE_MINUS_SRC_ALPHA so they work correctly with premultiplied
  data.

cogl.c: Make cogl_set_source_color() premultiply the color.

cogl.h.in color-material.h: Add some documentation about
  premultiplication and its interaction with color values.

cogl-pango-render.c clutter-texture.c tests/interactive/test-cogl-offscreen.c:
  Use premultiplied colors.

http://bugzilla.openedhand.com/show_bug.cgi?id=1406

Signed-off-by: Robert Bragg <robert@linux.intel.com>
2009-06-11 14:17:52 +01:00
..
Makefile.am [tests] Adds an interactive cogl vertex buffer unit test 2009-03-16 16:19:51 +00:00
test-actor-clone.c introspection-friendly ClutterEvent accessors 2009-06-08 12:05:20 +01:00
test-actors.c introspection-friendly ClutterEvent accessors 2009-06-08 12:05:20 +01:00
test-animation.c Remove usage of Units and macros 2009-06-04 16:30:30 +01:00
test-behave.c [timeline] Remove the concept of frames from timelines 2009-06-04 13:21:57 +01:00
test-binding-pool.c Remove usage of Units and macros 2009-06-04 16:30:30 +01:00
test-clip.c [cogl] Remove max_waste argument from Texture ctors 2009-05-23 19:35:19 +01:00
test-clutter-cairo-flowers.c [stage] Rename fullscreen methods 2009-06-09 14:07:35 +01:00
test-cogl-multitexture.c Merge branch 'timeline-no-fps' into 1.0-integration 2009-06-05 12:20:41 +01:00
test-cogl-offscreen.c Default to a blend function that expects premultiplied colors 2009-06-11 14:17:52 +01:00
test-cogl-primitives.c [timeline] Remove the concept of frames from timelines 2009-06-04 13:21:57 +01:00
test-cogl-tex-convert.c [cogl] Remove max_waste argument from Texture ctors 2009-05-23 19:35:19 +01:00
test-cogl-tex-foreign.c [cogl-handle] Optimize how we define cogl handles 2009-04-02 11:58:43 +01:00
test-cogl-tex-getset.c [cogl] Remove max_waste argument from Texture ctors 2009-05-23 19:35:19 +01:00
test-cogl-tex-polygon.c Merge branch 'timeline-no-fps' into 1.0-integration 2009-06-05 12:20:41 +01:00
test-cogl-tex-tile.c Merge branch 'timeline-no-fps' into 1.0-integration 2009-06-05 12:20:41 +01:00
test-cogl-vertex-buffer.c [timeline] Remove the concept of frames from timelines 2009-06-04 13:21:57 +01:00
test-depth.c [timeline] Remove the concept of frames from timelines 2009-06-04 13:21:57 +01:00
test-devices.c Bug 1162 - Re-works the tests/ to use the glib-2.16 unit testing 2008-11-07 19:32:28 +00:00
test-easing.c Uniformly use floats in Actor properties 2009-06-01 14:57:18 +01:00
test-entry.c Bug 1162 - Re-works the tests/ to use the glib-2.16 unit testing 2008-11-07 19:32:28 +00:00
test-events.c [stage] Rename fullscreen methods 2009-06-09 14:07:35 +01:00
test-fbo.c Remove CloneTexture from the API 2009-01-27 15:18:45 +00:00
test-fullscreen.c [stage] Rename fullscreen methods 2009-06-09 14:07:35 +01:00
test-grab.c Bug 1162 - Re-works the tests/ to use the glib-2.16 unit testing 2008-11-07 19:32:28 +00:00
test-layout.c introspection-friendly ClutterEvent accessors 2009-06-08 12:05:20 +01: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 Bug 1162 - Re-works the tests/ to use the glib-2.16 unit testing 2008-11-07 19:32:28 +00:00
test-multistage.c [timeline] Remove the concept of frames from timelines 2009-06-04 13:21:57 +01:00
test-offscreen.c Bug 1162 - Re-works the tests/ to use the glib-2.16 unit testing 2008-11-07 19:32:28 +00:00
test-paint-wrapper.c introspection-friendly ClutterEvent accessors 2009-06-08 12:05:20 +01:00
test-perspective.c [stage] Rename fullscreen methods 2009-06-09 14:07:35 +01:00
test-pixmap.c introspection-friendly ClutterEvent accessors 2009-06-08 12:05:20 +01:00
test-project.c Remove usage of Units and macros 2009-06-04 16:30:30 +01:00
test-random-text.c Update the interactive tests to ClutterText 2008-12-11 13:48:01 +00:00
test-rotate.c [timeline] Remove the concept of frames from timelines 2009-06-04 13:21:57 +01:00
test-scale.c [timeline] Remove the concept of frames from timelines 2009-06-04 13:21:57 +01:00
test-score.c [timeline] Remove the concept of frames from timelines 2009-06-04 13:21:57 +01:00
test-script.c Remove usage of the grave accent as quotation mark 2009-03-17 14:13:31 +00:00
test-shader.c Uniformly use floats in Actor properties 2009-06-01 14:57:18 +01:00
test-stage-read-pixels.c Remove Units from the public API 2009-05-06 16:44:47 +01:00
test-text-field.c [units] Rework Units into logical distance value 2009-06-04 16:30:31 +01:00
test-text.c [tests] Update the ClutterText interactive test 2009-01-07 15:54:08 +00:00
test-texture-async.c [texture] Fix error reporting on ::load-finished 2009-06-06 16:13:41 +01:00
test-texture-quality.c [timeline] Remove the concept of frames from timelines 2009-06-04 13:21:57 +01:00
test-textures.c Bug 1162 - Re-works the tests/ to use the glib-2.16 unit testing 2008-11-07 19:32:28 +00:00
test-threads.c introspection-friendly ClutterEvent accessors 2009-06-08 12:05:20 +01:00
test-unproject.c Remove Units from the public API 2009-05-06 16:44:47 +01:00
test-viewport.c [timeline] Remove the concept of frames from timelines 2009-06-04 13:21:57 +01:00
wrapper.sh Bug 1162 - Re-works the tests/ to use the glib-2.16 unit testing 2008-11-07 19:32:28 +00:00