commit e75e6e0c97f2f9878dc348775cfe75651872e927 Author: Emmanuele Bassi Date: Mon Aug 16 13:23:43 2010 +0100 Release Clutter 1.3.12 (developers snapshot) NEWS | 40 ++++++++++++++++++++++++++++++++++++++++ configure.ac | 2 +- 2 files changed, 41 insertions(+), 1 deletions(-) commit fd6d6a93f1550f6c423d1dfc2d228ae7b1c87707 Author: Emmanuele Bassi Date: Mon Aug 16 13:23:10 2010 +0100 build: Fix distcheck errors tests/conform/Makefile.am | 4 +--- tests/interactive/Makefile.am | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) commit 3142b15a9f4c77b2e3012013f174091b810d13ce Author: Emmanuele Bassi Date: Sun Aug 15 18:42:54 2010 +0100 build: Use maintainer-clean for the ignore files removal Instead of distclean. build/autotools/Makefile.am.gitignore | 11 +++++++---- doc/cookbook/examples/Makefile.am | 2 -- tests/conform/Makefile.am | 2 ++ tests/interactive/Makefile.am | 2 ++ tests/micro-bench/Makefile.am | 2 -- 5 files changed, 11 insertions(+), 8 deletions(-) commit c4913bfce91be011618bca93e2177ebccef1e648 Author: Emmanuele Bassi Date: Sun Aug 15 18:33:10 2010 +0100 Revert "build: Distclean generated ignore files" Git ignore files are not dist'ed, so it's pointless to remove them on distclean. This reverts commit f14587aadc428e5743d2b30e2a9f4bf51f1d1e05. tests/conform/Makefile.am | 2 +- tests/interactive/Makefile.am | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit e43215a5c9331517de555e44ba1181ad42ed79bc Author: Emmanuele Bassi Date: Sat Aug 14 08:53:18 2010 +0100 build: Rule for quick publishing of the cookbook Just call `make publish`. doc/cookbook/Makefile.am | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) commit 94c8635d0f4584ef81e565e7837bdeb0008e034e Author: Emmanuele Bassi Date: Sat Aug 14 08:43:16 2010 +0100 build: Autogenerate more ignore files The tests/accessibility, tests/micro-bench and the examples directory in the coobook create a lot of non-installed binaries. Since we know who they are, and we ignore them, we can auto-generate the ignore files as well. The rest of Clutter is covered by the main ignore file. build/autotools/Makefile.am | 1 + build/autotools/Makefile.am.gitignore | 21 +++++++++++++++++++++ doc/cookbook/examples/.gitignore | 8 -------- doc/cookbook/examples/Makefile.am | 4 ++++ tests/accessibility/.gitignore | 5 ----- tests/accessibility/Makefile.am | 4 ++++ tests/micro-bench/.gitignore | 5 ----- tests/micro-bench/Makefile.am | 3 +++ 8 files changed, 33 insertions(+), 18 deletions(-) commit f14587aadc428e5743d2b30e2a9f4bf51f1d1e05 Author: Emmanuele Bassi Date: Fri Aug 13 18:35:35 2010 +0100 build: Distclean generated ignore files tests/conform/Makefile.am | 2 +- tests/interactive/Makefile.am | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit a3bc2ebfa7cd4d62107ef56078b6973ff844e882 Author: Emmanuele Bassi Date: Fri Aug 13 18:32:10 2010 +0100 build: Make test-conform depend on Makefile changes tests/conform/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 1e0a83b88139a13a8488bfe7000e0c459ccbad66 Author: Emmanuele Bassi Date: Fri Aug 13 18:31:44 2010 +0100 build: Autogenerate interactive/.gitignore Exactly like we did for conform/.gitignore tests/interactive/.gitignore | 73 ----------------------------------------- tests/interactive/Makefile.am | 8 ++++- 2 files changed, 7 insertions(+), 74 deletions(-) commit 7c412464c27e712654ca7aa9e16ebcdba8bc0e7f Author: Emmanuele Bassi Date: Fri Aug 13 18:22:12 2010 +0100 build: Generate the conformance/.gitignore file Since we are generating a lot of files that we should ignore, we should generate the Git ignore file as well. tests/conform/.gitignore | 123 --------------------------------------------- tests/conform/Makefile.am | 7 +++ 2 files changed, 7 insertions(+), 123 deletions(-) commit e888da21804809f7700b0932d0eb16727cf15d09 Author: Emmanuele Bassi Date: Fri Aug 13 18:15:01 2010 +0100 build: Split up the test-conformance SOURCES Having different sections should make it easier to add new test units to the build. tests/conform/Makefile.am | 115 ++++++++++++++++++++++++++------------------ 1 files changed, 68 insertions(+), 47 deletions(-) commit ff9a5a01b4bef60496cb27e645ac23c790267f98 Author: Emmanuele Bassi Date: Fri Aug 13 18:14:10 2010 +0100 clutter.modules: Remove deps on gir-repository Keep it in the moduleset, but don't let Clutter depend on it. build/clutter.modules | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-) commit a25cf14e978dd51034baf2d0cd4c1743c93a7774 Author: Emmanuele Bassi Date: Fri Aug 13 18:12:43 2010 +0100 Revert "clutter.modules: Remove deps on gir-repository" This reverts commit 0ce9cf730b2a8c3b3ac4786afee0579a3795fd9e. The commit contained unrelated changes build/clutter.modules | 4 ++ tests/conform/Makefile.am | 115 ++++++++++++++++++-------------------------- 2 files changed, 51 insertions(+), 68 deletions(-) commit 0ce9cf730b2a8c3b3ac4786afee0579a3795fd9e Author: Emmanuele Bassi Date: Fri Aug 13 18:09:28 2010 +0100 clutter.modules: Remove deps on gir-repository Keep it in the moduleset, but don't let Clutter depend on it. build/clutter.modules | 4 -- tests/conform/Makefile.am | 115 ++++++++++++++++++++++++++------------------ 2 files changed, 68 insertions(+), 51 deletions(-) commit 175b16a5c81faf12e204274e87c013e2c65a4030 Author: Emmanuele Bassi Date: Fri Aug 13 18:00:23 2010 +0100 clutter.modules: Add a gtk2 module for gtk+ 2.x Mx (and others) depend on gtk+ 2.x, and not on gtk+ 3.x. build/clutter.modules | 17 +++++++++++++++-- 1 files changed, 15 insertions(+), 2 deletions(-) commit 271e0d960486acea896389b05ba521d569c7c83a Author: Emmanuele Bassi Date: Fri Aug 13 16:32:27 2010 +0100 animator: Plug some leaks clutter/clutter-animator.c | 20 +++++++------------- 1 files changed, 7 insertions(+), 13 deletions(-) commit 12031ca2c5a52c574ba7c16a86b84e049b0cfb38 Author: Robert Bragg Date: Mon Aug 9 16:01:17 2010 +0100 material: Implements weak materials Weak materials are ones that don't take a reference on their parent and they are associated with a callback that notifies when the material is destroyed, because its parent was freed or modified. More details can be found at: http://wiki.clutter-project.org/wiki/CoglDesign/CoglMaterial For now the concept is internal only but the plan is to make this public at some point once we have tested the design internally. clutter/cogl/cogl/cogl-material-private.h | 142 +++++++++++++++++++++ clutter/cogl/cogl/cogl-material.c | 191 +++++++++++++++++++++++------ 2 files changed, 297 insertions(+), 36 deletions(-) commit 50c5ecfe87b3074d997799eb864fbd9c999cd6c7 Author: Emmanuele Bassi Date: Fri Aug 13 12:12:59 2010 +0100 state: Plug some memory leakage Thanks to Valgrind, test-state-base now reports 0 bytes definitely lost. clutter/clutter-state.c | 26 +++++++++++++++++--------- tests/conform/test-state.c | 3 --- 2 files changed, 17 insertions(+), 12 deletions(-) commit 6c6e93d27a0381ff07ecb9c37f1b0840682f359f Merge: 12f2481 1ed5d5c Author: Emmanuele Bassi Date: Thu Aug 12 18:29:08 2010 +0100 Merge remote branch 'elliot/cookbook-events-mouse-scroll' * elliot/cookbook-events-mouse-scroll: cookbook: Cleaning up grammar and wording in mouse scroll recipe cookbook: Added more explanation about setting y coord on scrollable cookbook: Mentioned the animation in the sample code cookbook: Included video of the scroll example running cookbook: Made stage slightly smaller for scroll event example cookbook: Added video showing scrollable actor cookbook: Added walk through of code example for mouse scroll cookbook: Fixed link to example in mouse scroll recipe cookbook: Simplified full scroll example cookbook: Improved wording and formatting in mouse scroll intro. cookbook: Handle all possible mouse scroll directions cookbook: Build mouse scroll example with cookbook cookbook: Cleaned up redundant comments in code example cookbook: Added xmlns for XInclude to events docbook file cookbook: Added basic mouse scroll recipe commit 12f2481462df9d99114323dcf210a5219648cbee Author: Neil Roberts Date: Thu Aug 12 17:03:16 2010 +0100 docs: Update the build instructions in the reference This removes all references to SDL in the build instructions as the backend is no longer available. The OpenGL version required is only 1.2 not 1.4. The Windows build instructions were out of date and have been replaced with a link to the wiki instead. doc/reference/clutter/building-clutter.xml | 44 +++++++--------------------- 1 files changed, 11 insertions(+), 33 deletions(-) commit daf6e739364282b77a66d7bf8abb4e90ada8c865 Author: Emmanuele Bassi Date: Thu Aug 12 17:06:29 2010 +0100 Remove last uses of cogl_program_uniform* Following the commits: c03544da - clutter-shader: use cogl_program_set_uniform_xyz API a26119b5 - tests: Remove use of cogl_program_use Remove the users of cogl_program_uniform_* and cogl_program_use() in the shader-based effects. clutter/clutter-blur-effect.c | 14 +++++++------- clutter/clutter-colorize-effect.c | 10 ++++------ clutter/clutter-desaturate-effect.c | 10 ++++------ clutter/clutter-shader-effect.c | 31 +++++++++++++++++++------------ 4 files changed, 34 insertions(+), 31 deletions(-) commit e016a62ab03e2d1683cc4d100ac6079fe7863788 Author: Neil Roberts Date: Thu Aug 12 16:56:28 2010 +0100 build/mingw/README: Replace with a link to the wiki The build instructions for MinGW have been moved to the wiki. build/mingw/README | 138 +-------------------------------------------------- 1 files changed, 3 insertions(+), 135 deletions(-) commit 01a72725997db93cbe0ef6a47c304d456ce96205 Author: Robert Bragg Date: Thu Aug 12 10:43:22 2010 +0100 cogl-shader: get_info_log should always use strdup In the case where there is no error log for arbfp we were returning a "" string literal. The other paths were using g_strdup to return a string that could be freed with g_free. This makes the arbfp path return g_strdup ("") instead. clutter/cogl/cogl/cogl-shader.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) commit b50bdd791986d85a29c40c763b329b1347060769 Author: Robert Bragg Date: Thu Aug 12 10:40:39 2010 +0100 cogl-shader: correctly #ifdef guard an if else block There are quite a few if {} else {} blocks for dealing with arbfp else glsl and the first block is guarded with #ifdef HAVE_COGL_GL. In this case though the #endif was before the else so it wouldn't compile for gles. clutter/cogl/cogl/cogl-shader.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 94692370d2a95b55cccee4c08887e2b4298e418c Author: Robert Bragg Date: Thu Aug 12 10:37:55 2010 +0100 material-glsl: #include "cogl-shader-private.h" We need to include cogl-shader-private.h to have the COGL_SHADER_TYPE_GLSL define. When building for opengl this wasn't noticed probably because some other header indirectly includes this file. It was a problem when building for gles2 though. clutter/cogl/cogl/cogl-material-glsl.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit a26119b5514655df5accd2f65cb0ee3ed242b4ea Author: Robert Bragg Date: Wed Aug 11 19:39:41 2010 +0100 tests: Remove use of cogl_program_use The removes the use of cogl_program_use which has been deprecated and instead of using the cogl_program_uniform functions we now use the cogl_program_set_uniform methods. tests/interactive/test-cogl-shader-arbfp.c | 5 +---- tests/interactive/test-cogl-shader-glsl.c | 17 ++++++----------- 2 files changed, 7 insertions(+), 15 deletions(-) commit c03544daa6778bb52c292b4333e62084b508f58d Author: Robert Bragg Date: Wed Aug 11 19:32:09 2010 +0100 clutter-shader: use cogl_program_set_uniform_xyz API Instead of using the deprecated cogl_program_uniform_xyz functions we now use the cogl_program_set_uniform methods. It looks like this should also fix a problem with clutter-shader too in that previously we weren't calling cogl_program_use before cogl_program_uniform_xyz so setting uniforms would only work while the shader is enabled. clutter/clutter-shader.c | 15 ++++++++++----- 1 files changed, 10 insertions(+), 5 deletions(-) commit f03037d580e79d491fa965006cc379ad9f5c7ff6 Author: Robert Bragg Date: Wed Aug 11 19:18:14 2010 +0100 cogl-program: Adds use_uniform_xyz methods Instead of exposing an API that provides an OpenGL state machine style where you first have to bind the program to the context using cogl_program_use() followed by updating uniforms using cogl_program_uniform_xyz we now have uniform setter methods that take an explicit CoglHandle for the program. This deprecates cogl_program_use and all the cogl_program_uniform variants and provides the following replacements: cogl_program_set_uniform_1i cogl_program_set_uniform_1f cogl_program_set_uniform_int cogl_program_set_uniform_float cogl_program_set_uniform_matrix clutter/cogl/cogl/cogl-shader.h | 119 +++++++++++++++++++- clutter/cogl/cogl/driver/gl/cogl-program.c | 157 +++++++++++++++++--------- clutter/cogl/cogl/driver/gles/cogl-program.c | 127 ++++++++++++++++----- doc/reference/cogl/cogl-sections.txt | 5 + 4 files changed, 316 insertions(+), 92 deletions(-) commit 2f54f8f0ea5dd53dca495d44468beb3660e335b2 Author: Damien Lespiau Date: Thu Aug 12 10:36:04 2010 -0400 introspection: Use the --quiet flag conditionally --quiet has been added to g-ir-scanner in the 0.9.1 cycle. We really want to be able to compile clutter with 0.6.14 to be able to reuse gir files that are distributed in current distributions. Use the INTROSPECTION_SCANNER_ARGS (previously unused) variable to convey --quiet when necessary. Fixes: http://bugzilla.clutter-project.org/show_bug.cgi?id=2265 clutter/Makefile.am | 2 -- clutter/cogl/cogl/Makefile.am | 1 - clutter/json/Makefile.am | 1 - configure.ac | 7 +++++++ 4 files changed, 7 insertions(+), 4 deletions(-) commit 1f01fd0a4c1937dfc6371f9f8de2b07d0e9b4bd2 Author: Neil Roberts Date: Thu Aug 12 14:59:03 2010 +0100 clutter.modules: cluttersmith depends on gjs and clutter-gtk This adds dependencies on gjs and clutter-gtk to cluttersmith. There was no module listed for gjs so this is added from the jhbuild gnome module list. build/clutter.modules | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) commit c129c563f52a271e2ade2b2f7cd2424f9011164a Author: Neil Roberts Date: Thu Aug 12 14:37:27 2010 +0100 Remove test-random-text from the interactive .gitignore tests/interactive/.gitignore | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit 1a8df6788b6f23d75a99d4d9695e1983cd0910db Author: Emmanuele Bassi Date: Thu Aug 12 13:48:35 2010 +0100 Update the micro-bench Git ignore file tests/micro-bench/.gitignore | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) commit 053a1a9c512d00ccdbf3f81e5869b4fccbc8ff2b Author: Emmanuele Bassi Date: Thu Aug 12 13:46:58 2010 +0100 build: Add simple scripts for setting up jhbuild Use the same script also used by gnome-shell to set up the system dependencies for building Clutter (and its dependencies) using jhbuild. build/clutter-build-setup.sh | 174 ++++++++++++++++++++++++++++++++++++++++ build/jhbuildrc-clutter | 73 +++++++++++++++++ build/jhbuildrc-custom-example | 19 +++++ 3 files changed, 266 insertions(+), 0 deletions(-) commit 1ed5d5cab0af5617b566465b943615d3c7f1058c Author: Elliot Smith Date: Thu Aug 12 10:16:56 2010 +0100 cookbook: Cleaning up grammar and wording in mouse scroll recipe doc/cookbook/events.xml | 86 ++++++++++++++++++++++++---------------------- 1 files changed, 45 insertions(+), 41 deletions(-) commit db0c15aee8466b675af8b388d21a40bb3371db77 Author: Neil Roberts Date: Thu Aug 12 09:59:58 2010 +0100 cogl-atlas: Verify that the chosen initial size is supported CoglAtlas chooses a fairly large default initial size of either 512x512 or 1024x1024 depending on the texture format. There is a chance that this size will not be supported on some platforms which would be catastrophic for the glyph cache because it would mean that it would always fail to put any glyphs in the cache so text wouldn't work. To fix this the atlas code now checks whether the chosen initial size is supported by the texture driver and if not it will get halved until it is supported. clutter/cogl/cogl/cogl-atlas.c | 56 +++++++++++++++++++++++++++------------ 1 files changed, 39 insertions(+), 17 deletions(-) commit b9f9ea3a9c59a7d4282ecf7e0b1ae7e300ec6232 Author: Neil Roberts Date: Thu Aug 12 09:08:30 2010 +0100 cogl-atlas: Use _cogl_texture_driver_size_supported Previously when creating a new rectangle map it would try increasingly larger texture sizes until GL_MAX_TEXTURE_SIZE is reached. This is bad because it queries state which should really be owned by the texture driver. Also GL_MAX_TEXTURE_SIZE is often a conservative estimate so larger texture sizes can be used if the proxy texture is queried instead. clutter/cogl/cogl/cogl-atlas.c | 25 +++++++++++++++---------- 1 files changed, 15 insertions(+), 10 deletions(-) commit 72029e14db0c0b0f82c20cf6760ab96a81c76e46 Author: Neil Roberts Date: Wed Aug 11 15:08:00 2010 +0100 cogl-rectangle-map: Record largest gap rather than the remaining space Previously each node in the rectangle map tree would store the total remaining space in all of its children to use as an optimization when adding nodes. With this it could skip an entire branch of the tree if it knew there could never be enough space for the new node in the branch. This modifies that slightly to instead store the largest single gap. This allows it to skip a branch earlier because often there would be a lot of small gaps which would add up to enough a space for the new rectangle, but the space can't be used unless it is in a single node. The rectangle map still needs to keep track of the total remaining space for the whole map for the debugging output so this has been added back in to the CoglRectangleMap struct. There is a separate debugging function to verify this value. clutter/cogl/cogl/cogl-rectangle-map.c | 94 +++++++++++++++++++++++--------- 1 files changed, 68 insertions(+), 26 deletions(-) commit 2b5bb06bed2b272ba408d53a471f78c705bf0467 Author: Neil Roberts Date: Fri Aug 6 18:42:43 2010 +0100 cogl-atlas: Try the next size when there would be less than 6% waste Previously when the atlas needs to be migrated it would start by trying with the same size as the existing atlas if there is enough space for the new texture. However even if the atlas is completely sorted there will always be some amount of waste so when the atlas needs to grow it would usually end up redundantly trying the same size when it is very unlikely to fit. This patch changes it so that there must be at least 6% waste available after the new texture is added otherwise it will start with the next atlas size. clutter/cogl/cogl/cogl-atlas.c | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) commit f98be241a89cf4a9f23555631f2a7f722745f39b Author: Neil Roberts Date: Fri Aug 6 18:42:01 2010 +0100 cogl-atlas: Add some more debugging notes This adds some debugging notes which report when the atlas is trying various sizes. clutter/cogl/cogl/cogl-atlas.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) commit e080e824eedecf70d48e3ffc0b65b6a3dd3765c7 Author: Neil Roberts Date: Fri Aug 6 17:40:52 2010 +0100 cogl-rectangle-map: Use a GArray for the stack When iterating over the rectangle map a stack is used to implement a recursive algorithm. Previously this was slice allocating a linked list. Now it uses a GArray which is retained with the rectangle map to avoid frequent allocations which is a little bit faster. clutter/cogl/cogl/cogl-rectangle-map.c | 120 ++++++++++++++++++-------------- 1 files changed, 67 insertions(+), 53 deletions(-) commit 0e2d18d70075621c7ea8f7b721c6b0cbd013af1e Author: Neil Roberts Date: Fri Aug 6 16:13:20 2010 +0100 cogl-rectangle-map: Store the remaining space per node Previously the remaining space was managed as part of the CoglRectangleMap struct. Now it is stored per node so that at any point in the hierarchy we can quickly determine how much space is remaining in all of the node's children. That way when adding a rectangle we can miss out entire branches more quickly if we know that there is no way the new rectangle would fit in that branch. This also adds a function to recursively verify the cached state in the nodes such as the remaining space and the number of rectangles. This function is only called when the dump-atlas-image debug flag is set because it is potentially quite slow. clutter/cogl/cogl/cogl-rectangle-map.c | 108 ++++++++++++++++++++++++++++---- 1 files changed, 96 insertions(+), 12 deletions(-) commit e609a658a4355c479ec75748e72844f55c1047aa Author: Neil Roberts Date: Fri Aug 6 11:44:39 2010 +0100 cogl-atlas: Increase the default minimum texture size When initially creating a texture it would start with a minimum size of 256x256. This increases the size so that it would try to match 1MB of memory. clutter/cogl/cogl/cogl-atlas.c | 18 +++++++++++++++--- 1 files changed, 15 insertions(+), 3 deletions(-) commit d03fbf9f64da5448c6ab625049489474d0b78c71 Author: Neil Roberts Date: Wed Aug 4 18:05:21 2010 +0100 cogl-pango: Use a CoglAtlas to maintain the glyph cache The glyph cache is now stored in a CoglAtlas structure instead of the custom atlasing code. This has the advantage that it can share code with the main texture atlas and that it supports reorganizing the atlas when it becomes full. Unlike the texture atlas, the glyph cache can use multiple atlases which would be neccessary if the maximum texture size is reached and we need to create a second texture. Whenever a display list is created it now has to register a callback with the glyph cache so that the display list can be recreated whenever any of the atlases are reorganized. This is needed because the display list directly stores texture coordinates within the atlas texture and they would become invalid when the texture is moved. The ensure_glyphs_for_layout now works in two steps. First it reserves space in the atlas for all of the glyphs. The atlas is created with the DISABLE_MIGRATION flag so that it won't actually copy any textures if any rearranging is needed. Whenever the position is updated for a glyph then it is marked as dirty. After space for all of the glyphs has been reserved it will iterate over all dirty glyphs and redraw them using Cairo. The rendered glyph is then stored in the texture with a sub texture update. The glyphs need to all be set at the right location before starting to create the display list because the display list stores the texture coordinates of the glyph. If any of the glyphs were moved around then the parts of the display list that was created already would become invalid. To make this work, ensure_glyphs_for_layout is now always called before rendering a layout or a layout line. clutter/cogl/pango/cogl-pango-glyph-cache.c | 371 ++++++++++++--------------- clutter/cogl/pango/cogl-pango-glyph-cache.h | 46 +++- clutter/cogl/pango/cogl-pango-render.c | 226 +++++++++++------ 3 files changed, 343 insertions(+), 300 deletions(-) commit 047227fbd7a6a6c7de3f2c523fda75f0c3a36373 Author: Neil Roberts Date: Thu Aug 5 13:24:02 2010 +0100 cogl-atlas: Support multiple formats and clearing the texture _cogl_atlas_new now has two extra parameters to specify the format of the textures it creates as well as a set of flags to modify the behavious of the atlas. One of the flags causes the new textures to be cleared and the other causes migration to avoid actually copying the textures. This is needed to use CoglAtlas from the pango glyph cache because it needs to use COGL_PIXEL_A_8 and to clear the textures as it does not fill in the gaps between glyphs. It needs to avoid copying the textures so that it can work on GL implementations without FBO support. clutter/cogl/cogl/cogl-atlas-texture.c | 4 +- clutter/cogl/cogl/cogl-atlas.c | 96 ++++++++++++++++++++++++-------- clutter/cogl/cogl/cogl-atlas.h | 12 ++++- 3 files changed, 86 insertions(+), 26 deletions(-) commit 9b2f8179f00708f26400648e21d6ee77cc13aa35 Author: Neil Roberts Date: Mon Aug 2 16:29:10 2010 +0100 cogl-atlas-texture: Split out the atlas data structure Instead of storing a pointer to the CoglRectangleMap and a handle to the atlas texture in the context, there is a now a separate data structure called a CoglAtlas to manage these two. The context just contains a pointer to this. The code to reorganise the atlas has been moved from cogl-atlas-texture.c to cogl-atlas.c clutter/cogl/cogl/Makefile.am | 2 + clutter/cogl/cogl/cogl-atlas-texture-private.h | 4 + clutter/cogl/cogl/cogl-atlas-texture.c | 585 ++++-------------------- clutter/cogl/cogl/cogl-atlas.c | 596 ++++++++++++++++++++++++ clutter/cogl/cogl/cogl-atlas.h | 86 ++++ clutter/cogl/cogl/cogl-context.c | 10 +- clutter/cogl/cogl/cogl-context.h | 5 +- 7 files changed, 774 insertions(+), 514 deletions(-) commit 0c8582aad838bf0110cceeb2bedad4ae09645ce6 Author: Neil Roberts Date: Wed Aug 4 17:59:06 2010 +0100 cogl: Add an internal utility to maintain a list of callback functions This adds an internal CoglCallbackList type which is just a GSList of of function pointers along with a data pointer to form a closure. There are functions to add and remove items and to invoke the list of functions. This could be used in a number of places in Cogl. clutter/cogl/cogl/Makefile.am | 2 + clutter/cogl/cogl/cogl-callback-list.c | 107 ++++++++++++++++++++++++++++++++ clutter/cogl/cogl/cogl-callback-list.h | 58 +++++++++++++++++ 3 files changed, 167 insertions(+), 0 deletions(-) commit 4989000f55f1f5a88d397c29a7973ebecf6e4b3e Author: Neil Roberts Date: Mon Aug 2 15:24:03 2010 +0100 cogl-atlas: Rename to CoglRectangleMap This simply renames CoglAtlas to CoglRectangleMap without making any functional changes. The old 'CoglAtlas' is just a data structure for managing unused areas of a rectangle and it doesn't neccessarily have to be used for an atlas so it wasn't a very good name. clutter/cogl/cogl/Makefile.am | 4 +- clutter/cogl/cogl/cogl-atlas-texture-private.h | 12 +- clutter/cogl/cogl/cogl-atlas-texture.c | 169 ++++---- clutter/cogl/cogl/cogl-atlas.c | 598 ----------------------- clutter/cogl/cogl/cogl-atlas.h | 78 --- clutter/cogl/cogl/cogl-context.c | 7 +- clutter/cogl/cogl/cogl-context.h | 4 +- clutter/cogl/cogl/cogl-rectangle-map.c | 612 ++++++++++++++++++++++++ clutter/cogl/cogl/cogl-rectangle-map.h | 78 +++ 9 files changed, 792 insertions(+), 770 deletions(-) commit 1e45428483f82b240bc45f20556cf767c49da902 Author: Neil Roberts Date: Thu Aug 5 17:54:18 2010 +0100 test-random-text: Convert to a micro-benchmark test-random-text is moved to the micro-bench directory. It now prints out the time taken to draw every 10 frames. tests/interactive/Makefile.am | 1 - tests/interactive/test-random-text.c | 86 ----------------------------- tests/micro-bench/Makefile.am | 4 +- tests/micro-bench/test-random-text.c | 101 ++++++++++++++++++++++++++++++++++ 4 files changed, 104 insertions(+), 88 deletions(-) commit 65f449bdb0625c866781c56f025d20d20772dc8d Author: Neil Roberts Date: Thu Aug 5 17:27:23 2010 +0100 test-text-perf: Add a wider range of characters Instead of just using the latin alphabet, this adds digits and some other alphabets to increase the range of glyphs used. tests/micro-bench/test-text-perf.c | 36 +++++++++++++++++++++++++++++++++++- 1 files changed, 35 insertions(+), 1 deletions(-) commit c26d2c5ef90c49e3854d6630c2ade6d7069865d8 Author: Neil Roberts Date: Thu Aug 5 17:06:45 2010 +0100 test-text-perf: Scale the text if the settings will not fit If the font size or the number of characters causes the label not to fit on the stage, instead of aborting it will now scale the labels so that it fits within one of the dimensions. This makes it easier to test with large glyph sizes. tests/micro-bench/test-text-perf.c | 37 +++++++++++++++++++++++++++++------ 1 files changed, 30 insertions(+), 7 deletions(-) commit 89c535f50d4affe761c7ea0ca2cb90066a2c1639 Author: Neil Roberts Date: Thu Aug 12 09:11:28 2010 +0100 cogl-material: Compare whether textures are equal by their GL handle Textures within a layer were compared for equality by comparing their texture handle. However this means that sub textures and atlas textures which may be internally using the same GL handle would not be batched together. Instead it now tries to determine the underlying GL handle using either the slice override or _cogl_texture_get_gl_texture and then compares those. clutter/cogl/cogl/cogl-material.c | 35 ++++++++++++++++++++++++++--------- 1 files changed, 26 insertions(+), 9 deletions(-) commit 8db96675d4332bc81edb1f5f4dfe237ab81a4d9e Author: Elliot Smith Date: Thu Aug 12 10:05:27 2010 +0100 cookbook: Added more explanation about setting y coord on scrollable Added some extra explanation, referencing the sample code, to try to make the scrollable actor example easier to follow. Basically demonstrates the principles described in the paragraph about setting the y coordinate for the scrollable actor, but using actual numbers. doc/cookbook/events.xml | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) commit 8538bdbdeae74433ed5f50b1e6ee0db3d9a81a3e Author: Neil Roberts Date: Wed May 5 16:45:21 2010 +0100 cogl-atlas-texture: Accept formats with different component orders When filtering on allowed formats for atlas textures, it now masks out the BGR and AFIRST bits in addition to the premult bit. That way it will accept RGB and RGBA formats in any component order. In theory it could also accept luminance and alpha-only textures but I haven't added this because presumably if the application has requested these formats then it has some reason not to use a full RGB or RGBA texture and we should respect that. clutter/cogl/cogl/cogl-atlas-texture.c | 19 ++++++++++++++++--- 1 files changed, 16 insertions(+), 3 deletions(-) commit 2bf01dd9592854073b241ae562867732c7b45b2a Author: Emmanuele Bassi Date: Thu Aug 12 09:03:58 2010 +0100 build: Make the introspection generation quiet (again) build/autotools/Makefile.am.silent | 20 ++++++++++++++------ clutter/Makefile.am | 12 ++++++++---- clutter/cogl/cogl/Makefile.am | 4 +++- clutter/json/Makefile.am | 4 +++- 4 files changed, 28 insertions(+), 12 deletions(-) commit 9b736cfeba8f4f3b57c8657b4d41aa554d03fec0 Author: Emmanuele Bassi Date: Thu Aug 12 08:53:06 2010 +0100 drag-action: Capture ENTER when dragging This completes commit 9ab83cebf. clutter/clutter-drag-action.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit a74d585fc522d010d4c8cbcffc566afc9ce495ca Author: Elliot Smith Date: Wed Aug 11 17:14:09 2010 +0100 cookbook: Mentioned the animation in the sample code Put in comments to make it clear where the animation for the mouse scroll is coming from in the sample code. doc/cookbook/events.xml | 1 + doc/cookbook/examples/events-mouse-scroll.c | 1 + 2 files changed, 2 insertions(+), 0 deletions(-) commit a421f0ae429bcf666dbfa1d44b15bfdbb06f898f Author: Elliot Smith Date: Wed Aug 11 17:12:42 2010 +0100 cookbook: Included video of the scroll example running Inlined the video of the mouse scroll example code running to the docbook file for events. doc/cookbook/events.xml | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) commit 1cfa87853a3fe1edf569a91c60528ee2d85679f7 Author: Elliot Smith Date: Wed Aug 11 17:11:29 2010 +0100 cookbook: Made stage slightly smaller for scroll event example Reduced the size of the stage to make for a smaller video. doc/cookbook/examples/events-mouse-scroll.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit f5db4943de58cf3ac9eb4aecf2278e298deaa052 Author: Elliot Smith Date: Wed Aug 11 17:10:45 2010 +0100 cookbook: Added video showing scrollable actor doc/cookbook/Makefile.am | 1 + doc/cookbook/videos/events-mouse-scroll.ogv | Bin 0 -> 49532 bytes 2 files changed, 1 insertions(+), 0 deletions(-) commit f568a68ee16ce7f59596bd1336f37eee1667b7a1 Author: Elliot Smith Date: Wed Aug 11 16:54:28 2010 +0100 cookbook: Added walk through of code example for mouse scroll Modified the mouse scroll example to fit better with the tutorial walkthrough. Added a stepped walkthrough of the scrollable actor code example. doc/cookbook/events.xml | 224 ++++++++++++++++++++++++++- doc/cookbook/examples/events-mouse-scroll.c | 33 +++- 2 files changed, 243 insertions(+), 14 deletions(-) commit 57ba89c8de1e85d52f3e6d73dade472c0da7f22e Author: Elliot Smith Date: Wed Aug 11 14:41:42 2010 +0100 cookbook: Fixed link to example in mouse scroll recipe doc/cookbook/events.xml | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) commit 5e0bc919c305e1825bba75277df883c231f65837 Author: Elliot Smith Date: Wed Aug 11 14:39:22 2010 +0100 cookbook: Simplified full scroll example Removed the layout and box to simplify the scrollable actor example. doc/cookbook/examples/events-mouse-scroll.c | 69 ++++++++++++++------------- 1 files changed, 35 insertions(+), 34 deletions(-) commit e216771a86d985631c2ee1182f1ae7c240e5c28d Author: Elliot Smith Date: Wed Aug 11 11:14:54 2010 +0100 cookbook: Improved wording and formatting in mouse scroll intro. doc/cookbook/events.xml | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 0f919fcbe3b8c5afed58e082c2dd7e14756b207c Author: Elliot Smith Date: Wed Aug 11 11:10:53 2010 +0100 cookbook: Handle all possible mouse scroll directions Added empty cases for MOUSE_SCROLL_LEFT and MOUSE_SCROLL_RIGHT to the scroll-event signal handler in the example code. doc/cookbook/examples/events-mouse-scroll.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit f1312e118d21c293625754248c07fa1168a1732c Author: Elliot Smith Date: Wed Aug 11 11:09:04 2010 +0100 cookbook: Build mouse scroll example with cookbook doc/cookbook/examples/.gitignore | 1 + doc/cookbook/examples/Makefile.am | 2 ++ 2 files changed, 3 insertions(+), 0 deletions(-) commit 241ceab73cbc1fa0a1f7c19ad95fdd54b1c26864 Author: Elliot Smith Date: Wed Aug 11 11:03:37 2010 +0100 cookbook: Cleaned up redundant comments in code example Removed comments which are only relevant in my local build environment. doc/cookbook/examples/events-mouse-scroll.c | 6 ------ 1 files changed, 0 insertions(+), 6 deletions(-) commit 5e268e0bbb0e2dcbf6edfbf3e1725a3e61e8dbd0 Author: Elliot Smith Date: Wed Aug 11 11:03:02 2010 +0100 cookbook: Added xmlns for XInclude to events docbook file doc/cookbook/events.xml | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit ec7186627726885acc4487f5f44177281c0f3fc6 Author: Elliot Smith Date: Wed Aug 11 10:34:49 2010 +0100 cookbook: Added basic mouse scroll recipe Added a recipe explaining the basics of mouse scroll events. doc/cookbook/events.xml | 115 +++++++++++++++++++++++++++ doc/cookbook/examples/events-mouse-scroll.c | 108 +++++++++++++++++++++++++ 2 files changed, 223 insertions(+), 0 deletions(-) commit ed39948ccf776b50fba9c3c7934ddb727091db11 Author: Emmanuele Bassi Date: Wed Aug 11 17:43:15 2010 +0100 colorize-effect: Do not inherit from ShaderEffect See commits: 7daeb217 blur-effect: Do not inherit from ShaderEffect 1ec57743 desaturate-effect: Do not inherit from ShaderEffect We might avoid using shaders at all in the future for simple effects. clutter/clutter-colorize-effect.c | 156 ++++++++++++++++++++++++++++++------- 1 files changed, 126 insertions(+), 30 deletions(-) commit d10ebe9fcaf28b85d707ea41f5856632f9c8a934 Author: Emmanuele Bassi Date: Wed Aug 11 17:25:17 2010 +0100 effects: Check before using the cogl_shader_* API Since BlurEffect and DesaturateEffect are using the shader API implicitly and not using ClutterShaderEffect, we need to check if the underlying GL implementation supports the GLSL shading language and warn if not. clutter/clutter-blur-effect.c | 12 ++++++++++++ clutter/clutter-desaturate-effect.c | 12 ++++++++++++ 2 files changed, 24 insertions(+), 0 deletions(-) commit 9ab83cebfdd4808db7ebe09193b218f62f157049 Author: Emmanuele Bassi Date: Wed Aug 11 14:42:56 2010 +0100 drag-action: Capture stage leave If we are dragging, we don't want the drag handle to emit a ::leave-event even if the pointer left the stage. clutter/clutter-drag-action.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) commit 1ec577438e2f710970276dc3872bf4c8bb360ddf Author: Emmanuele Bassi Date: Wed Aug 11 14:19:48 2010 +0100 desaturate-effect: Do not inherit from ShaderEffect Hide the fact that we're using a fragment shader, in case we're able in the future to use a material layer combine function when painting the offscreen target texture. clutter/clutter-desaturate-effect.c | 128 ++++++++++++++++++++++++++++------- 1 files changed, 104 insertions(+), 24 deletions(-) commit 7daeb217bd9f1e0e38ac6201f722bdc7fd2c45b6 Author: Emmanuele Bassi Date: Wed Aug 11 13:05:42 2010 +0100 blur-effect: Do not inherit from ShaderEffect We might want to switch the BlurEffect from a box-blur to a super-sampling of the texture target, in order to make it cheap(er). If we inherit from ShaderEffect, though, we're setting in stone the fact that we are going to use a fragment shader for blurring. Since there is not parametrization of the blur, the code necessary to implement effect is pretty small, and we can use the Cogl API directly. clutter/clutter-blur-effect.c | 157 +++++++++++++++++++++++++++-------------- 1 files changed, 103 insertions(+), 54 deletions(-) commit eb4dee46b70a73d0926e8e36bb75abc52604256e Author: Emmanuele Bassi Date: Wed Aug 11 13:58:29 2010 +0100 shader-effect: Attach the program to the target material Instead of calling cogl_program_use() around the paint_target() chain-up, we can use the newly added API in CoglMaterial to attach user-defined shaders to the offscreen target material. clutter/clutter-shader-effect.c | 39 ++++++++++++++++++++++++--------------- 1 files changed, 24 insertions(+), 15 deletions(-) commit 304e7dd077f1e7f9e7eab8b3b15bf6f22bf354f0 Author: Emmanuele Bassi Date: Wed Aug 11 13:53:02 2010 +0100 test-drag: Fix the page curl angle tests/interactive/test-drag.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit c87bfef1eb7f59975513bed9da70a45ce50f7dd3 Author: Emmanuele Bassi Date: Wed Aug 11 12:40:22 2010 +0100 stage: Fix the user-resizable property enumeration id clutter/clutter-stage.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) commit 59a9786942c7cfae9b6ba138cf76ba658709fedb Author: Emmanuele Bassi Date: Wed Aug 11 11:39:24 2010 +0100 actor: Use box origin instead of direct access clutter/clutter-actor.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 5e1d40c07b66bcb4c2c0a4fd203bfdfeeaf3f17e Merge: 8d51617 d14e294 Author: Emmanuele Bassi Date: Wed Aug 11 11:32:44 2010 +0100 Merge branch 'wip/table-layout' * wip/table-layout: Add ClutterTableLayout, a layout showing children in rows and columns box-layout: Use allocate_align_fill() bin-layout: Migrate to allocate_align_fill() actor: Add allocate_align_fill() test-flow-layout: Use BindConstraints commit d14e294d86d35e9128d04ebf9a43367b5babac40 Author: José Dapena Paz Date: Thu Mar 18 17:02:31 2010 +0100 Add ClutterTableLayout, a layout showing children in rows and columns A TableLayout is a layout manager that allocates its children in rows and columns. Each child is assigned to a cell (or more if a cell span is set). The supported child properties are: • x-expand and y-expand: if this cell with try to allocate the available extra space for the table. • x-fill and y-fill: if the child will get all the space available in the cell. • x-align and y-align: if the child does not fill the cell, then where the child will be aligned inside the cell. • row-span and col-span: number of cells the child will allocate for itself. Also, the TableLayout has row-spacing and col-spacing for specifying the space in pixels between rows and between columns. We also include a simple test of the layout manager, and the documentation updates. The TableLayout was implemented starting from MxTable and ClutterBoxLayout. http://bugzilla.clutter-project.org/show_bug.cgi?id=2038 Signed-off-by: Emmanuele Bassi clutter/Makefile.am | 2 + clutter/clutter-table-layout.c | 2642 ++++++++++++++++++++++++++++ clutter/clutter-table-layout.h | 163 ++ clutter/clutter.h | 1 + doc/reference/clutter/clutter-docs.xml.in | 1 + doc/reference/clutter/clutter-sections.txt | 47 + doc/reference/clutter/clutter.types | 1 + tests/interactive/.gitignore | 1 + tests/interactive/Makefile.am | 3 +- tests/interactive/test-table-layout.c | 275 +++ 10 files changed, 3135 insertions(+), 1 deletions(-) commit 1043e77a00b1f5965b9a5ff52db6d0f0bd93e88c Author: Emmanuele Bassi Date: Tue Aug 10 22:20:38 2010 +0100 box-layout: Use allocate_align_fill() Remove duplicated code, and use the newly added actor method to compute the child allocation based on alignment and fill. clutter/clutter-box-layout.c | 116 ++++++++---------------------------------- 1 files changed, 21 insertions(+), 95 deletions(-) commit 6ad4126e1783d1e9a04eaf88accce6d0950064d6 Author: Emmanuele Bassi Date: Tue Aug 10 17:43:26 2010 +0100 bin-layout: Migrate to allocate_align_fill() Now that we have the code in ClutterActor itself. clutter/clutter-bin-layout.c | 100 +++++++---------------------------------- 1 files changed, 17 insertions(+), 83 deletions(-) commit 07b01888baed28e5fb3f0831a2441218b469f846 Author: Emmanuele Bassi Date: Tue Aug 10 17:40:01 2010 +0100 actor: Add allocate_align_fill() Layout managers are using the same code to allocate a child while taking into consideration: • horizontal and vertical alignment • horizontal and vertical fill • the preferred minimum and natural size, depending on the :request-mode property • the text direction for the horizontal alignment • an offset given by the fixed position properties Given the amount of code involved, and the amount of details that can go horribly wrong while copy and pasting such code in various classes - let alone various projects - Clutter should provide an allocate() variant that does the right thing in the right way. This way, we have a single point of failure. clutter/clutter-actor.c | 139 ++++++++++++++++++++++++++++ clutter/clutter-actor.h | 7 ++ doc/reference/clutter/clutter-sections.txt | 1 + 3 files changed, 147 insertions(+), 0 deletions(-) commit 02b7bf3635ce9a3a67016847e99128bd0a9f67d9 Author: Emmanuele Bassi Date: Tue Aug 10 17:43:56 2010 +0100 test-flow-layout: Use BindConstraints If we want to fit the FlowLayout to the Stage size we should use the BindConstraint API instead of a watcher on ::allocation-changed. tests/interactive/test-flow-layout.c | 28 +++++++--------------------- 1 files changed, 7 insertions(+), 21 deletions(-) commit 8d5161797974f8f9eb25da844f64fc27bceb28f4 Author: Neil Roberts Date: Mon Jun 21 10:20:32 2010 +0100 Conditionally use g_object_notify_by_pspec This adds a wrapper macro to clutter-private that will use g_object_notify_by_pspec if it's compiled against a version of GLib that is sufficiently new. Otherwise it will notify by the property name as before by extracting the name from the pspec. The objects can then store a static array of GParamSpecs and notify using those as suggested in the documentation for g_object_notify_by_pspec. Note that the name of the variable used for storing the array of GParamSpecs is obj_props instead of properties as used in the documentation because some places in Clutter uses 'properties' as the name of a local variable. Mose of the classes in Clutter have been converted using the script in the bug report. Some classes have not been modified even though the script picked them up as described here: json-generator: We probably don't want to modify the internal copy of JSON behaviour-depth: rectangle: score: stage-manager: These aren't using the separate GParamSpec* variable style. blur-effect: win32/device-manager: Don't actually define any properties even though it has the enum. box-layout: flow-layout: Have some per-child properties that don't work automatically with the script. clutter-model: The script gets confused with ClutterModelIter stage: Script gets confused because PROP_USER_RESIZE doesn't match "user-resizable" test-layout: Don't really want to modify the tests http://bugzilla.clutter-project.org/show_bug.cgi?id=2150 clutter/clutter-actor-meta.c | 13 ++- clutter/clutter-actor.c | 208 +++++++++++++++++++----------- clutter/clutter-align-constraint.c | 15 ++- clutter/clutter-alpha.c | 19 ++- clutter/clutter-animation.c | 40 ++++-- clutter/clutter-animator.c | 8 +- clutter/clutter-behaviour-ellipse.c | 37 ++++-- clutter/clutter-behaviour-opacity.c | 12 ++- clutter/clutter-behaviour-path.c | 9 +- clutter/clutter-behaviour-rotate.c | 27 +++- clutter/clutter-behaviour-scale.c | 16 ++- clutter/clutter-behaviour.c | 9 +- clutter/clutter-bin-layout.c | 18 ++- clutter/clutter-bind-constraint.c | 15 ++- clutter/clutter-binding-pool.c | 7 +- clutter/clutter-box.c | 15 ++- clutter/clutter-cairo-texture.c | 12 ++- clutter/clutter-child-meta.c | 8 +- clutter/clutter-click-action.c | 10 +- clutter/clutter-clone.c | 9 +- clutter/clutter-colorize-effect.c | 9 +- clutter/clutter-deform-effect.c | 13 ++- clutter/clutter-desaturate-effect.c | 9 +- clutter/clutter-device-manager.c | 7 +- clutter/clutter-drag-action.c | 15 ++- clutter/clutter-input-device.c | 9 +- clutter/clutter-interval.c | 7 +- clutter/clutter-layout-meta.c | 7 +- clutter/clutter-page-turn-effect.c | 15 ++- clutter/clutter-path.c | 8 +- clutter/clutter-private.h | 12 ++ clutter/clutter-script.c | 8 +- clutter/clutter-settings.c | 15 ++- clutter/clutter-shader-effect.c | 7 +- clutter/clutter-shader.c | 20 ++- clutter/clutter-state.c | 10 +- clutter/clutter-text.c | 91 +++++++++----- clutter/clutter-texture.c | 42 +++++-- clutter/clutter-timeline.c | 18 ++- clutter/x11/clutter-device-manager-x11.c | 7 +- clutter/x11/clutter-input-device-x11.c | 7 +- clutter/x11/clutter-keymap-x11.c | 7 +- 42 files changed, 608 insertions(+), 242 deletions(-) commit bfa10f629f6400ff31471922ad57c27c71e76697 Author: Elliot Smith Date: Tue Aug 10 11:02:17 2010 +0100 cookbook: Added recipe for non-rectangular actor Added a new recipe for creating a non-rectangular actor using ClutterPath (aka "shaped pick") and the Cogl primitives API. Also cleaned up XML alignment in the actors.xml file. doc/cookbook/actors.xml | 691 +++++++++++++++++++++++++++++++++++------------ 1 files changed, 523 insertions(+), 168 deletions(-) commit de8276105f34b480dee0b2044debe001c25710ac Author: Owen W. Taylor Date: Mon Aug 9 15:06:35 2010 -0400 Always bind a new texture to unit 1 when necessary The special handling for texture unit 1 caught the case where unit 1 was changed for transient purposes, but didn't properly handle the case where the actual non-transient texture was different between two materials with no transient binding in between. If the actual texture has changed when flushing, mark unit 1 as dirty and needing a rebind. http://bugzilla.clutter-project.org/show_bug.cgi?id=2261 clutter/cogl/cogl/cogl-material-opengl.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) commit b646f0cfa9277ca9fd7bc7da035942a72924d6e0 Author: Emmanuele Bassi Date: Mon Aug 9 19:56:00 2010 +0100 clutter.modules: Add Cluttersmith build/clutter.modules | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) commit 966cbd51278421d99360454a525e3789a04b1f5d Author: Emmanuele Bassi Date: Mon Aug 9 19:55:42 2010 +0100 clutter.modules: Mx moved to clutter-project.org build/clutter.modules | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit ecc086e9eb86829646d72ca99f618fa7ba4ad95d Author: Emmanuele Bassi Date: Mon Aug 9 19:38:23 2010 +0100 Silence a compiler warning clutter/cogl/cogl/cogl-shader.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit 1c2e41e1b388fdf82867ac4071734316e5731870 Merge: 985a4db eaed9c2 Author: Emmanuele Bassi Date: Mon Aug 9 17:44:42 2010 +0100 Merge remote branch 'elliot/cookbook-layouts-introduction' * elliot/cookbook-layouts-introduction: cookbook: Added layout introduction and "stacking actors" recipe cookbook: Added layouts.xml to the list of XML files cookbook: Added layouts section and introduction commit 985a4db94799ae9279ecde166ff46c5de2f369bf Author: Damien Lespiau Date: Thu Aug 5 15:55:12 2010 +0100 gitignore: Ignore test-cogl-shader-{arbfp,glsl} Fear the out of tree builds! tests/interactive/.gitignore | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit a4339842f938312da4a51b8592e38e207b15bdc3 Author: Robert Bragg Date: Thu Aug 5 15:18:39 2010 +0100 tests-interactive: Adds a test-cogl-shader-glsl.c This is based on test-shader.c but is solely implemented with the cogl_program/shader APIs instead of the clutter shader APIs. tests/interactive/Makefile.am | 1 + tests/interactive/test-cogl-shader-glsl.c | 382 +++++++++++++++++++++++++++++ 2 files changed, 383 insertions(+), 0 deletions(-) commit f6a1f56031ed0bb404b902db83629732fc788b32 Author: Robert Bragg Date: Thu Aug 5 15:20:49 2010 +0100 tests/interactive: Adds a test-cogl-shader-arbfp.c This tests the ARBfp support for cogl_program and cogl_shader using the shaders Chris Lord adapted from test-shader when he was experimenting with adding ARBfp support to clutter back in 2008 (See: http://bugzilla.clutter-project.org/show_bug.cgi?id=1049) tests/interactive/Makefile.am | 1 + tests/interactive/test-cogl-shader-arbfp.c | 404 ++++++++++++++++++++++++++++ 2 files changed, 405 insertions(+), 0 deletions(-) commit 09e664c349d6132801683c2b4cc5852d57e5f3a6 Author: Robert Bragg Date: Wed Aug 4 17:53:51 2010 +0100 cogl: Allow setting ARBfp source on a CoglShader This makes CoglProgram/Shader automatically detect when the user has given an ARBfp program by checking for "!!ARBfp1.0" at the beginning of the user's source. ARBfp local parameters can be set with cogl_program_uniform_float assuming you pass a @size of 4 (all ARBfp program.local parameters are vectors of 4 floats). This doesn't expose ARBfp environment parameters or double precision local parameters. clutter/cogl/cogl/cogl-material-arbfp.c | 72 ++++++++-- clutter/cogl/cogl/cogl-material-glsl.c | 24 +-- clutter/cogl/cogl/cogl-shader-private.h | 13 ++ clutter/cogl/cogl/cogl-shader.c | 116 ++++++++++++--- clutter/cogl/cogl/cogl.c | 6 +- clutter/cogl/cogl/driver/gl/cogl-program.c | 204 ++++++++++++++++++++++---- clutter/cogl/cogl/driver/gl/cogl-program.h | 11 +- clutter/cogl/cogl/driver/gles/cogl-program.c | 7 + 8 files changed, 371 insertions(+), 82 deletions(-) commit 5741e28cdcba3619f0eadff0e8de0d7b0d9c5c60 Author: Robert Bragg Date: Thu Aug 5 10:59:03 2010 +0100 cogl: Adds a COGL_FEATURE_SHADERS_ARBFP feature flag This adds a public feature flag for ARBfp so developers can determine if the cogl API supports ARBfp or not. clutter/cogl/cogl/cogl-internal.h | 2 +- clutter/cogl/cogl/cogl-material-arbfp.c | 2 +- clutter/cogl/cogl/cogl-types.h | 4 +++- clutter/cogl/cogl/cogl.c | 2 +- .../cogl/cogl/driver/gl/cogl-feature-functions.h | 4 ++-- 5 files changed, 8 insertions(+), 6 deletions(-) commit f781bcec7e92c4387a2b755510681502290f8e75 Author: Robert Bragg Date: Thu Aug 5 10:46:54 2010 +0100 material: Add cogl_material_{get,set}_user_program Previously we had an internal only _cogl_material_set_user_program to redirect legacy usage of cogl_program_use() through CoglMaterial. This instead makes the API public because until we implement our planned "snippet" framework we need a stop-gap solution for using shaders in Cogl. The plan is to also support ARBfp with the cogl_program/shader API so this API will also allow clutter-gst to stop using direct OpenGL calls that conflict with Cogl's state tracking. clutter/cogl/cogl/cogl-material-private.h | 4 -- clutter/cogl/cogl/cogl-material.c | 24 +++++++++-- clutter/cogl/cogl/cogl-material.h | 64 +++++++++++++++++++++++++++++ 3 files changed, 84 insertions(+), 8 deletions(-) commit 1314d0b1a7567efd89f0aeca94a1d3e4c6b392bb Author: Robert Bragg Date: Sun Aug 8 13:54:07 2010 +0100 material: chain up in layer_pre_change_notify A change to a layer is also going to be a change to its owning material so we have to chain up in _cogl_material_layer_pre_change_notify and call _cogl_material_pre_change_notify. Previously we were only considering if the owning material was referenced in the journal but that ignores that it might also have dependants. We no longer need to flush the journal directly in layer_pre_change_notify. clutter/cogl/cogl/cogl-material.c | 16 ++++++++++++---- 1 files changed, 12 insertions(+), 4 deletions(-) commit 855661754653ed1b5b1e0f1bf491f7e360ca5ed0 Author: Robert Bragg Date: Sun Aug 8 14:26:45 2010 +0100 material: unlink old layer from owner when replacing In _cogl_material_layer_pre_change_notify when we see that a layer has dependants and it can't be modified directly then we allocate a new layer. In this case we also have to link the new layer to its required owner. If the immutable layer we copied had the same owner though we weren't unlinking that old layer. clutter/cogl/cogl/cogl-material.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit eeac7c5f431cf9c6df66ddbe8a9c862e9143884c Author: Robert Bragg Date: Sun Aug 8 13:41:15 2010 +0100 material: fix initialization of sparse properties In _cogl_material_pre_change_notify we need to identify if it's a sparse property being changed and if so initialize the state group if the given material isn't currently the authority for it. Previously we were unconditionally calling _cogl_material_initialize_state which would e.g. NULL the layer differences list of a material each time a layer change was notified. It would also call _cogl_material_initialize_state for non-sparse properties which should always be valid at this point so the function has been renamed to _cogl_material_initialize_sparse_state to make this clearer with a corresponding g_return_if_fail check. clutter/cogl/cogl/cogl-material.c | 25 ++++++++++++++----------- 1 files changed, 14 insertions(+), 11 deletions(-) commit d489832688ab28e7a2a889cf793bef6ab8fab334 Author: Robert Bragg Date: Sun Aug 8 13:09:27 2010 +0100 material: fix copying of material layer differences This fixes how we copy layer differences in _cogl_material_copy_layer_differences. We were making a redundant g_list_copy of the src differences and then iterating the src list calling _cogl_material_add_layer_difference for each entry which would double the list length, but the initial copy directly referenced the original layers which wasn't correct. Also we were initializing dest->n_layers before copying the layer differences but the act of copying the differences will re-initialize n_layers to 0 when adding the first layer_difference since it will trigger a layer_pre_change_notify and since the dest material isn't yet a STATE_LAYERS authority the state group is initialized before allowing the change. clutter/cogl/cogl/cogl-material.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) commit 0e2880b067e96ff93deec6c3a6ffb7aa0cd4cee4 Author: Robert Bragg Date: Sun Aug 8 13:05:40 2010 +0100 material: don't dereference layer->texture directly In _cogl_material_texture_storage_change_notify we were potentially dereferencing layer->texture without checking first that it is the authority of texture state. We now use _cogl_material_layer_get_texture() instead. clutter/cogl/cogl/cogl-material-opengl.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 9c46cb7f21fba3a8871128866c74325a598f49f2 Author: Robert Bragg Date: Sun Aug 8 14:09:26 2010 +0100 material: Improve the dot file debugging code This improve the dot file output available when calling _cogl_debug_dump_materials_dot_file. The material graph now directly points into the layer graph and the layers now show the texture unit index. clutter/cogl/cogl/cogl-material.c | 30 ++++++++++++++++-------------- 1 files changed, 16 insertions(+), 14 deletions(-) commit eaed9c22da03caa1a0ce43656f2afdfc00ac5115 Author: Elliot Smith Date: Thu Aug 5 16:46:36 2010 +0100 cookbook: Added layout introduction and "stacking actors" recipe Expanded the layout introduction and added a recipe about stacking actors using ClutterBinLayout, with two examples. doc/cookbook/Makefile.am | 1 + doc/cookbook/examples/.gitignore | 2 + doc/cookbook/examples/Makefile.am | 14 +- .../examples/layouts-stacking-diff-sized-actors.c | 78 +++++ doc/cookbook/examples/layouts-stacking.c | 80 +++++ .../images/layouts-stacking-diff-actor-sizes.png | Bin 0 -> 1579 bytes doc/cookbook/layouts.xml | 325 +++++++++++++++++++- 7 files changed, 487 insertions(+), 13 deletions(-) commit 309dd1f50e73cf6bf6e5308abca3b77135dd4686 Author: Elliot Smith Date: Thu Aug 5 13:43:23 2010 +0100 cookbook: Added layouts.xml to the list of XML files Make sure layouts.xml is included for make dist. doc/cookbook/Makefile.am | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 1a44b56b7a5b42ff26abde46c5fdea2f8e3858ff Author: Elliot Smith Date: Tue Aug 3 11:00:19 2010 +0100 cookbook: Added layouts section and introduction doc/cookbook/clutter-cookbook.xml.in | 1 + doc/cookbook/layouts.xml | 281 ++++++++++++++++++++++++++++++++++ 2 files changed, 282 insertions(+), 0 deletions(-) commit 1943b8e544a985e08cd4fbe2ae79320fed2f2548 Author: Emmanuele Bassi Date: Mon Aug 9 11:29:03 2010 +0100 glx: Depend on libdrm DRM is available on more platforms than Linux (e.g. kFreeBSD), but Clutter currently FTBFS there because of not being an alternative to the __linux__ code (where it should be HAVE_DRM). Instead of copying the DRM data structures, we should use libdrm when falling back to directly requesting to wait for the vblank. http://bugzilla.clutter-project.org/show_bug.cgi?id=2225 Based on a patch by: Emilio Pozuelo Monfort Signed-off-by: Emmanuele Bassi clutter/glx/clutter-stage-glx.c | 43 ++++++++++----------------------------- configure.ac | 8 +++++++ 2 files changed, 19 insertions(+), 32 deletions(-) commit 28378f1bb4f74c4ba97618f404386b26a28f5224 Author: Emmanuele Bassi Date: Mon Aug 9 11:06:44 2010 +0100 layout-manager: Do not emit layout-changed on thaw When thawing a LayoutManager, do not emit the ::layout-changed signal since it might still be in the middle of a relayout. http://bugzilla.clutter-project.org/show_bug.cgi?id=2255 clutter/clutter-layout-manager.c | 17 +++++++++++++---- 1 files changed, 13 insertions(+), 4 deletions(-) commit 306385c2eb6ea3e0df406edc34227ca8c2622b7d Author: Emmanuele Bassi Date: Mon Aug 9 08:50:18 2010 +0100 animator: Remove redundant parenthesis clutter/clutter-animator.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 74301da8e7bbce31395871927fe8afd6e08bbfd9 Author: Emmanuele Bassi Date: Sun Aug 8 19:18:46 2010 +0100 animator: Improve the key value copy Use the same code used elsewhere in Clutter when dealing with values that can be copied or transformed. clutter/clutter-animator.c | 41 ++++++++++++++++++++++++++++------------- 1 files changed, 28 insertions(+), 13 deletions(-) commit 1ca0c2a6d1ce7477b4c31c507603c870f298c79d Author: Emmanuele Bassi Date: Sun Aug 8 19:17:14 2010 +0100 state: Return a boolean when getting the key value Since the copy might fail, we should return a boolean value and not just warn on the console - similarly to what ClutterAnimator does. clutter/clutter-state.c | 26 ++++++++++++++++++-------- clutter/clutter-state.h | 2 +- 2 files changed, 19 insertions(+), 9 deletions(-) commit 786285a245096950015f55adc6f43db23371dc90 Author: Emmanuele Bassi Date: Sun Aug 8 13:48:51 2010 +0100 clutter.modules: Fix UProf id build/clutter.modules | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit fa8ee94c597fa34000d471c1e959a74ebe114076 Author: Emmanuele Bassi Date: Fri Aug 6 19:33:21 2010 +0100 clutter.modules: Fix the uprof repository UProf has moved. build/clutter.modules | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) commit d07a525eccc4b9504980ee01531dc5ee6b8db6e4 Author: Emmanuele Bassi Date: Fri Aug 6 17:04:37 2010 +0100 text: Do not set the markup unconditionally When setting :use-markup we always pass the contents of the Text actor to clutter_text_set_markup_internal(); if string contains any markup, this ends up being parsed and used - even when :use-markup is set to FALSE. http://bugzilla.clutter-project.org/show_bug.cgi?id=2239 clutter/clutter-text.c | 66 ++++++++++++++++++++++++++++++++++++++++-------- 1 files changed, 55 insertions(+), 11 deletions(-) commit fcbfd4ec34ba53953935954cf90f09e5675fb8cc Author: Neil Roberts Date: Fri Aug 6 16:41:41 2010 +0100 cogl-material: Unref the texture when reverting authority When the texture is set on a layer so that it is back to the parent's texture it would clear the texture change flag but it wouldn't unref the texture. The free function for a material layer does not unref the texture if the change flag is cleared so the texture would end up leaking. This happens for ClutterTexture because it disposes the texture by setting layer 0 of the material to COGL_INVALID_HANDLE which ends up the same as the default material. clutter/cogl/cogl/cogl-material.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit 7032e249501080a699e19a731be2bc7d7ecc325f Author: Damien Lespiau Date: Fri Aug 6 15:39:01 2010 +0100 cookbook: Make the table of content have a depth of 2 Instead of showing Problem/Solution/Discussion for each recipe, let's just show the title of those recipes. doc/common/cookbook.xsl | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit 86c3be550efa724d512b6b1c699e05f7f4257bea Author: Damien Lespiau Date: Fri Aug 6 12:30:06 2010 +0100 cookbook: Remove the note about indenting It's not necessary now to special case the indentation of includes as the XSLT for the cookbook strips leading and trailing space automaticaly for us. doc/cookbook/clutter-cookbook.xml.in | 13 +++---------- 1 files changed, 3 insertions(+), 10 deletions(-) commit 4f5ab7d01049ab3b9ceed5a8cbe6b01e8a928a4e Author: Damien Lespiau Date: Thu Aug 5 13:21:52 2010 +0100 cookbook: Close a tag, making xsltproc happier A tag was not closed. doc/cookbook/text.xml | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit cbd6e047dd61ac7ceb47996346ded26d52e6d6d0 Author: Damien Lespiau Date: Thu Aug 5 10:58:42 2010 +0100 cookbook: Add a recipe on how to create sub-textures Fiddle with Cogl textures to create a new ClutterTexture that only displays a rectangular region of a bigger ClutterTexture. doc/cookbook/Makefile.am | 2 + doc/cookbook/examples/.gitignore | 4 +- doc/cookbook/examples/Makefile.am | 16 ++- doc/cookbook/examples/smiley.png | Bin 0 -> 2856 bytes doc/cookbook/examples/textures-split-go.c | 184 ++++++++++++++++++++++++++ doc/cookbook/examples/textures-sub-texture.c | 60 +++++++++ doc/cookbook/images/textures-sub-texture.png | Bin 0 -> 4664 bytes doc/cookbook/textures.xml | 136 +++++++++++++++++++ doc/cookbook/videos/textures-split-go.ogv | Bin 0 -> 89625 bytes 9 files changed, 394 insertions(+), 8 deletions(-) commit ad1f1cb741203f64d97d093981f1e58907ee8e96 Author: Damien Lespiau Date: Thu Aug 5 19:50:29 2010 +0100 cookbook: Strip leading and trailing space inside programlisting It's a XSL FAQ to be able to chomp text nodes and we just have to copy and paste a XSLT 1.0 solution from: http://dpawson.co.uk/xsl/sect2/N8321.html#d11325e833 Let's then empower our cookbook customization layer to chomp text nodes, children of programlisting. doc/common/cookbook.xsl | 79 +++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 79 insertions(+), 0 deletions(-) commit c0c9ddab65a47404c0e6c5aa3a94c8a235c6d0ff Author: Damien Lespiau Date: Tue Aug 3 22:26:14 2010 +0100 cookbook: Add text.xml to the list of XML files text.xml was feeling lonely and forgotten, that's fixed now. doc/cookbook/Makefile.am | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit b4f4942e07cd2d7f5ad6e235fadb8ed2cf45f48d Author: Damien Lespiau Date: Tue Aug 3 21:02:23 2010 +0100 cookbook: Add the source XML files as dependencies in the Makefile rules The generated cookbook files (either HTML or PDF) do not only depend on clutter-cookbok.xml but also on all the chapters that compose the cookbook. Add this dependency to the Makefile rules to have make rebuild the book when a chapter changes. Since XML_FILES is now the list of source files, move recipe-template.xml to EXTRA_DIST. doc/cookbook/Makefile.am | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit 8ac3cb29ea6a04f434887c4e7a441ae4a4e67729 Author: Robert Bragg Date: Fri Aug 6 14:12:22 2010 +0100 material: only deference layer->texture for authority In _cogl_material_layer_pre_paint we were mistakenly dereferencing the layer->texture member for the passed layer instead of dereferencing the texture state authority which was causing crashes in some cases. clutter/cogl/cogl/cogl-material.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 069266f3ed911dd8de69066c5d50a4befca468a8 Author: Emmanuele Bassi Date: Thu Aug 5 18:10:22 2010 +0100 layout-manager: Freeze ::layout-changed when creating LayoutMeta LayoutMeta instances are created lazily. If an actor is added to a container with a layout manager then the first time the layout manager might be creating the LayoutMeta instance could be during the allocation cycle caused by calling clutter_actor_show(). When a LayoutMeta is instantiated for the first time, a list of properties can be set - and this might lead to the emission of the ::layout-changed signal. The signal is, most typically, going to cause a relayout to be queued, and a warning will be printed on the terminal. We should freeze the emission of the ::layout-changed signal during the creation of the LayoutMeta instances, and thaw it after that. clutter/clutter-layout-manager.c | 62 ++++++++++++++++++++++++++++++++++++-- 1 files changed, 59 insertions(+), 3 deletions(-) commit e7381c47fdaae7d52f9e1e7a1c48d7ecadeae503 Author: Emmanuele Bassi Date: Thu Aug 5 17:22:50 2010 +0100 bin-layout: Add a text to the test We have a rectangle, a cairo texture and a texture. Let's go add a text actor as well. tests/interactive/test-bin-layout.c | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) commit 315965290b23900e01840a2e6ef1cff17d222969 Author: Emmanuele Bassi Date: Thu Aug 5 16:19:51 2010 +0100 texture: Update the request mode depending on the size If a Texture has been set to: • keep its size synchronized with the image data • maintain the aspect ratio of the image data then it should also change its request mode depending on the orientation of the image data, so that layout managers have a fighting chance of sizing it correctly. clutter/clutter-texture.c | 25 ++++++++++++++++++++++++- 1 files changed, 24 insertions(+), 1 deletions(-) commit 2d4125a053b73acc1c037f02bbf1c52bcb6b0a41 Author: Emmanuele Bassi Date: Thu Aug 5 15:29:54 2010 +0100 texture: Make the :filename property readable UI builders and other tools are be interested in the file used to load the image data. README | 7 ++++++- clutter/clutter-texture.c | 44 ++++++++++++++++++++++++++++++++++++-------- 2 files changed, 42 insertions(+), 9 deletions(-) commit 70303d6f0cbaaddc06be43ce3f3b0b2b79eaa604 Author: Emmanuele Bassi Date: Thu Aug 5 13:06:38 2010 +0100 Post-release version bump to 1.3.11 configure.ac | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)