profile/ivi/clutter.git
14 years agocookbook: Moved paragraph where it logically belongs
Elliot Smith [Tue, 6 Jul 2010 15:11:46 +0000 (16:11 +0100)]
cookbook: Moved paragraph where it logically belongs

There was a note about constants for keys and
where they are defined in Clutter header files; but
the sentence about where key modifiers are defined
was outside the note. Logically, they belong
together.

14 years agocookbook: Added some judicious note elements
Elliot Smith [Tue, 6 Jul 2010 15:09:58 +0000 (16:09 +0100)]
cookbook: Added some judicious note elements

In some cases, there were blocks of text which
were really asides/interrupts to the flow, but
which weren't explicitly marked as such. I fixed
them by turning them into <note> blocks.

14 years agocookbook: Added more information for contributors
Elliot Smith [Tue, 6 Jul 2010 15:08:43 +0000 (16:08 +0100)]
cookbook: Added more information for contributors

Suggested use of <note> element for adding detail
or asides which would otherwise interrupt the
flow of the recipe.

14 years agocookbook: Link out to docbook site
Elliot Smith [Tue, 6 Jul 2010 15:04:46 +0000 (16:04 +0100)]
cookbook: Link out to docbook site

Corrected the link on the word Docbook, as it
was an internal <link> rather than an external
<ulink>.

14 years agocookbook: Made docbook element usage consistent
Elliot Smith [Tue, 6 Jul 2010 15:00:33 +0000 (16:00 +0100)]
cookbook: Made docbook element usage consistent

Made usage of docbook elements consistent across
recipes; to ensure the conventions are kept by others,
added a section about how to write and style recipes.

14 years agocookbook: Additional selectors in CSS stylesheet
Elliot Smith [Tue, 6 Jul 2010 14:42:32 +0000 (15:42 +0100)]
cookbook: Additional selectors in CSS stylesheet

Added some selectors for docbook element types
[properties and types], so those elements can be used in recipes

14 years agocookbook: Copy the CSS file into the HTML build directory
Elliot Smith [Tue, 6 Jul 2010 14:34:19 +0000 (15:34 +0100)]
cookbook: Copy the CSS file into the HTML build directory

This makes local testing easier, as you can see what the
cookbook will look like when installed.

14 years agotest-state: fix test for state count after state removal
Øyvind Kolås [Tue, 6 Jul 2010 13:26:07 +0000 (14:26 +0100)]
test-state: fix test for state count after state removal

In the .json file used for the test, there is no null -> "base"
transition defined only a "clicked" -> "base", when the "clicked" state
is removed the "base" state will also disappear.

14 years agoanimator: fix removal of multiple keys
Øyvind Kolås [Tue, 6 Jul 2010 12:38:16 +0000 (13:38 +0100)]
animator: fix removal of multiple keys

When removing keys, sometimes a couple of keys would be remaining.

14 years agostate: added clutter_state_key_get_property_type
Øyvind Kolås [Tue, 6 Jul 2010 12:47:49 +0000 (13:47 +0100)]
state: added clutter_state_key_get_property_type

A function to retrieve the type of the value stored in a key, the
equivalent already exists for ClutterAnimator.

14 years agostate: automatically remove unused states
Øyvind Kolås [Tue, 6 Jul 2010 12:34:22 +0000 (13:34 +0100)]
state: automatically remove unused states

When there is no further keys with a state as the target state, remove
the state (and all transitions that used this state as a target)

14 years agobuild: Exclude built sources from the dist
Alexandros Frantzis [Tue, 6 Jul 2010 12:24:00 +0000 (13:24 +0100)]
build: Exclude built sources from the dist

http://bugzilla.clutter-project.org/show_bug.cgi?id=2169

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
14 years agobuild: Allow to run the tests from any directory
Damien Lespiau [Sun, 6 Jun 2010 21:47:02 +0000 (22:47 +0100)]
build: Allow to run the tests from any directory

I was fed up to cd into the tests/conform or tests/interactive directories
to launch a specific test. Now, with the power the abs_ variants of
builddir and srcdir we can run specific test from any directory.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2159

14 years agodebug: Adds a COGL_DEBUG=disable-pbos debug option
Robert Bragg [Tue, 6 Jul 2010 00:30:25 +0000 (01:30 +0100)]
debug: Adds a COGL_DEBUG=disable-pbos debug option

For testing purposes, either to identify bugs in Cogl or the driver or
simulate lack of PBO support COGL_DEBUG=disable-pbos can be used to
fallback to malloc instead.

14 years agopango-render: set CLAMP_TO_EDGE wrap mode on glyph_material
Robert Bragg [Sat, 3 Jul 2010 18:05:04 +0000 (19:05 +0100)]
pango-render: set CLAMP_TO_EDGE wrap mode on glyph_material

The pango renderer was causing lots of override materials to be allocated
because the vertex_buffer API converts AUTOMATIC mode into REPEAT for
backwards compatibility. By explicitly setting the wrap mode to
CLAMP_TO_EDGE when creating the glyph_material then the vertex_buffer
API will leave it untouched.

14 years agopixel-array: Allow passing of hints to cogl_buffer_map
Robert Bragg [Mon, 5 Jul 2010 15:14:00 +0000 (16:14 +0100)]
pixel-array: Allow passing of hints to cogl_buffer_map

This allows you to tell Cogl that you are planning to replace all the
buffer's data once it is mapped with cogl_buffer_map. This means if the
buffer is currently being accessed by the GPU then the driver doesn't
have to stall and wait for it to finish before it can access it from the
CPU and can instead potentially allocate a new buffer with undefined
data and map that.

14 years agotest-cogl-pixel-array: fix how data is initialized
Robert Bragg [Mon, 5 Jul 2010 18:49:35 +0000 (19:49 +0100)]
test-cogl-pixel-array: fix how data is initialized

There was a missing '* 4' and '* i' in the for() loops that initialized
the first test buffer, so it was containing uninitialized data causing
the test to fail.

14 years agomoduleset: Update cairo and pixman versions
Emmanuele Bassi [Tue, 6 Jul 2010 10:57:16 +0000 (11:57 +0100)]
moduleset: Update cairo and pixman versions

The gtk+ we use for clutter-gtk depends on a new version of Cairo.

14 years agomoduleset: Remove libXft
Emmanuele Bassi [Tue, 6 Jul 2010 10:42:08 +0000 (11:42 +0100)]
moduleset: Remove libXft

The system one should be enough.

14 years agoUpdate conformance Git ignore file
Emmanuele Bassi [Mon, 5 Jul 2010 15:45:19 +0000 (16:45 +0100)]
Update conformance Git ignore file

14 years agoconform: don't reference old test_cogl_pixel_buffer symbol
Robert Bragg [Mon, 5 Jul 2010 15:17:34 +0000 (16:17 +0100)]
conform: don't reference old test_cogl_pixel_buffer symbol

Since CoglPixelBuffer was renamed to CoglPixelArray the test entry point
was also renamed to test_cogl_pixel_array, but mistakenly the
corresponding test-conform-main.c change wasn't pushed at the same time.

14 years agocogl-object: cogl_is_XYZ prototype should take void *
Robert Bragg [Sat, 3 Jul 2010 20:11:33 +0000 (21:11 +0100)]
cogl-object: cogl_is_XYZ prototype should take void *

This changes the cogl_is_XYZ function prototypes generated when using
the COGL_OBJECT_DEFINE macro to take a void * argument instead of a
CoglHandle argument.

14 years agopixel-array: Only allow allocation of arrays with a 2D size
Robert Bragg [Sat, 3 Jul 2010 23:49:31 +0000 (00:49 +0100)]
pixel-array: Only allow allocation of arrays with a 2D size

This removes cogl_pixel_array_new which just took a size in bytes.

Without the image size and pixel format then the driver often doesn't
have enough information to allocate optimal GPU memory that can be
textured from directly. This is because GPUs often have ways to
spatially alter the layout of a texture to improve cache access patterns
which may require special alignment and padding dependant in the images
width, height and bpp.

Although currently we are limited by OpenGL because it doesn't let us
pass on the width and height when allocating a PBO, the hope is that we
can define a better extension at some point.

14 years agopixel-array: rename new_from_size to new_with_size
Robert Bragg [Sat, 3 Jul 2010 23:45:12 +0000 (00:45 +0100)]
pixel-array: rename new_from_size to new_with_size

It is more in keeping with other coding conventions in Cogl to use new
"with" size instead of new "from" size.

14 years agocogl-buffer-private.h: cleanup up the coding style
Robert Bragg [Sat, 3 Jul 2010 23:18:10 +0000 (00:18 +0100)]
cogl-buffer-private.h: cleanup up the coding style

This file was following the Clutter coding style of arranging prototypes
into columns which Cogl doesn't copy.

14 years agorename CoglPixelBuffer to CoglPixelArray
Robert Bragg [Sat, 3 Jul 2010 22:46:03 +0000 (23:46 +0100)]
rename CoglPixelBuffer to CoglPixelArray

This renames CoglPixelBuffer to CoglPixelArray to be consistent with the
new CoglVertexArray API.

14 years agocogl-buffer: make the COGL_BUFFER_USAGE_HINT private
Robert Bragg [Sat, 3 Jul 2010 20:30:33 +0000 (21:30 +0100)]
cogl-buffer: make the COGL_BUFFER_USAGE_HINT private

The usage hint should be implied by the CoglBuffer subclass type so the
public getter and setter APIs for manually changing the usage hint of a
CoglBuffer have now been removed.

14 years agocogl-buffer: Handle subclass registration like cogl-texture
Robert Bragg [Sat, 3 Jul 2010 22:56:44 +0000 (23:56 +0100)]
cogl-buffer: Handle subclass registration like cogl-texture

Instead of having to extend cogl_is_buffer with new buffer types
manually this now adds a new COGL_BUFFER_DEFINE macro to be used instead
of COGL_OBJECT_DEFINE for CoglBuffer subclasses. This macro will
automatically register the new type with ctx->buffer_types which will
iterated by cogl_is_buffer. This is the same coding pattern used for
CoglTexture.

14 years agopixel-buffer: Replace CoglHandle with CoglPixelBuffer *
Robert Bragg [Sat, 3 Jul 2010 19:24:36 +0000 (20:24 +0100)]
pixel-buffer: Replace CoglHandle with CoglPixelBuffer *

One more file converted to stop using CoglHandle re:a8c8cbee513

14 years agocogl-material: Adds debug api to dump sparse material graph
Robert Bragg [Fri, 2 Jul 2010 17:04:45 +0000 (18:04 +0100)]
cogl-material: Adds debug api to dump sparse material graph

This adds a _cogl_debug_dump_materials_dot_file function that can be
used to dump all the descendants of the default material to a file using
the dot format which can then be converted to an image to visualize.

14 years agocogl-vertex-buffer.h: #include <cogl/cogl-defines.h>
Robert Bragg [Sun, 4 Jul 2010 01:44:37 +0000 (02:44 +0100)]
cogl-vertex-buffer.h: #include <cogl/cogl-defines.h>

cogl-vertex-buffer.h was assuming that the platforms GL headers had
already been included but that shouldn't have to be the case.

14 years agocogl-object-private.h: #include glib.h and cogl-types.h
Robert Bragg [Sat, 3 Jul 2010 20:10:05 +0000 (21:10 +0100)]
cogl-object-private.h: #include glib.h and cogl-types.h

cogl-object-private.h was only working in places that had already
included glib.h and cogl-types.h

14 years agomaterial: don't keep extra ref on copy-on-write materials
Robert Bragg [Sat, 3 Jul 2010 17:44:47 +0000 (18:44 +0100)]
material: don't keep extra ref on copy-on-write materials

In _cogl_material_pre_change_notify if a material with descendants is
modified then we create a new material that is a copy of the one being
modified and reparent those descendants to the new material.

This patch ensures we drop the reference we get from cogl_material_copy
since we can rely on the descendants to keep the new material alive.

14 years agobuild: Fix GLES builds since the material backend split
Robert Bragg [Fri, 2 Jul 2010 00:07:36 +0000 (01:07 +0100)]
build: Fix GLES builds since the material backend split

The commit to split the fragment processing backends out from
cogl-material.c (3e1323a6362906a95) broke the GLES 1 and 2 builds the
fix was to guard the code in each backend according to the
COGL_MATERIAL_BACKEND_XYZ defines which are setup in
cogl-material-private.h.

14 years agodocs: Add a cogl-paths section
Emmanuele Bassi [Fri, 2 Jul 2010 16:48:19 +0000 (17:48 +0100)]
docs: Add a cogl-paths section

The path primitives have a specific section, now, and gtk-doc is loudly
complaining about it being defined but not referenced.

14 years agostate: rename property "target-state" to "state"
Øyvind Kolås [Fri, 2 Jul 2010 15:44:54 +0000 (16:44 +0100)]
state: rename property "target-state" to "state"

This reduces the amount of typing, and should provide for more readable
code for most uses of ClutterState.

14 years agoConvert the ASCII art documentation in cogl-vertex-buffer to PNGs
Neil Roberts [Fri, 2 Jul 2010 15:19:48 +0000 (16:19 +0100)]
Convert the ASCII art documentation in cogl-vertex-buffer to PNGs

The documentation for cogl_vertex_buffer_indices_get_for_quads was
using ugly ASCII art to draw the diagrams. These have now been
replaced with PNG figures.

14 years agoAdd CoglMaterialWrapMode to the Cogl docs and fix docs for the getters
Neil Roberts [Fri, 2 Jul 2010 12:49:34 +0000 (13:49 +0100)]
Add CoglMaterialWrapMode to the Cogl docs and fix docs for the getters

CoglMaterialWrapMode was missing from the cogl-sections.txt file so it
wasn't getting displayed. There were also no documented return values
from the getters.

14 years agoalign-constraint: Offset the position after the alignment factor
Emmanuele Bassi [Fri, 2 Jul 2010 10:38:22 +0000 (11:38 +0100)]
align-constraint: Offset the position after the alignment factor

Instead of aligning (pos + size), align on size alone, and then offset
by pos.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2168

14 years agoFix building the tesselator code for GLES
Neil Roberts [Thu, 1 Jul 2010 19:34:59 +0000 (20:34 +0100)]
Fix building the tesselator code for GLES

The tesselator code uses some defines that it expects to be in the GL
headers such as GLAPI and GLAPIENTRY. These are used to mark the entry
points as exportable on each platform. We don't really want the
tesselator code to use these but we also don't want to modify the C
files so instead they are #defined to be empty in the stub glu.h. That
header is only included internally when building the tesselator/ files
so it shouldn't affect the rest of Cogl.

GLES also doesn't have a GLdouble type so we just #define this to be a
regular double.

14 years agocookbook: Fix up the textures section
Emmanuele Bassi [Thu, 1 Jul 2010 15:05:41 +0000 (16:05 +0100)]
cookbook: Fix up the textures section

14 years agocookbook: Fix examples
Emmanuele Bassi [Thu, 1 Jul 2010 14:59:15 +0000 (15:59 +0100)]
cookbook: Fix examples

14 years agocogl-material: Don't doubly ref the parent in cogl_material_copy
Neil Roberts [Thu, 1 Jul 2010 14:27:03 +0000 (15:27 +0100)]
cogl-material: Don't doubly ref the parent in cogl_material_copy

cogl_material_copy was taking a reference on the original texture when
making a copy. However it then calls _cogl_material_set_parent on the
material which also takes a reference on the parent. The second
reference is cleaned up whenever _cogl_material_unparent is called and
this is also called by _cogl_material_free. However, it seems that
nothing was cleaning up the first reference. I think the reference is
entirely unnecessary so this patch removes it.

14 years agoalign-constraint: Follow the position of the source
Emmanuele Bassi [Thu, 1 Jul 2010 13:09:37 +0000 (14:09 +0100)]
align-constraint: Follow the position of the source

The AlignConstraint update is using only the width/height of the source,
but it should also take into account the position.

Also, instead of using the ::notify signal, it should follow the
BindConstraint, and switch to the ::allocation-changed signal, since
it's less expensive (one emission instead of four notifications, one for
each property we use).

14 years agocogl: don't include cogl-vector.h twice in cogl.h
Robert Bragg [Thu, 1 Jul 2010 11:21:25 +0000 (12:21 +0100)]
cogl: don't include cogl-vector.h twice in cogl.h

cogl-vector.h should only be included by cogl.h when
COGL_ENABLE_EXPERIMENTAL_API is defined. This removes the unguarded
duplicate include.

14 years agocookbook: Clean up build
Emmanuele Bassi [Thu, 1 Jul 2010 11:17:01 +0000 (12:17 +0100)]
cookbook: Clean up build

Create two HTML versions of the cookbook:

  • single page
  • multiple pages

Use the online version of the DocBook XHTML XSL, and disable the PDF
generation until we can restore it.

14 years agocookbook: Split the cookbook chapters
Emmanuele Bassi [Thu, 1 Jul 2010 10:29:46 +0000 (11:29 +0100)]
cookbook: Split the cookbook chapters

Use separate files, to avoid making the XML too big and uneditable.

This breaks the PDF build.

14 years agocookbook: Fix up the examples
Emmanuele Bassi [Thu, 1 Jul 2010 10:08:51 +0000 (11:08 +0100)]
cookbook: Fix up the examples

14 years agocogl: declare experimental symbols consistently
Robert Bragg [Wed, 30 Jun 2010 17:06:04 +0000 (18:06 +0100)]
cogl: declare experimental symbols consistently

We had several different ways of exposing experimental API, in one case
the symbols had no special suffix, in two other ways the symbols were
given an _EXP suffix but in different ways.

This makes all experimental API have an _EXP suffix which is handled
using #defines in the header so the prototypes in the .c and .h files
don't have the suffix.

The documented reason for the suffix is so that anyone watching Cogl for
ABI changes who sees symbols disappear will hopefully understand what's
going on.

14 years agocookbook: Fix entity typo
Emmanuele Bassi [Wed, 30 Jun 2010 16:26:34 +0000 (17:26 +0100)]
cookbook: Fix entity typo

14 years agocookbook: Re-style
Emmanuele Bassi [Wed, 30 Jun 2010 16:18:15 +0000 (17:18 +0100)]
cookbook: Re-style

Use a modified version of the Poky Handbook CSS for the HTML version of
the Cookbook.

Promote Elliot as author.

Re-license from the GPLv2.0 to the CC BY-NC-SA 2.0.

14 years agocogl/tesselator: Update to the latest code from GLU
Neil Roberts [Wed, 30 Jun 2010 14:51:52 +0000 (15:51 +0100)]
cogl/tesselator: Update to the latest code from GLU

This grabs the latest code for libtess from git Mesa. This is mostly
so that we can get the following commit which fixes a lot of compiler
warnings in Clutter:

commit 75acb896c6da758d03e86f8725d6ca0cb2c6ad82
Author: Neil Roberts <neil@linux.intel.com>
Date:   Wed Jun 30 12:41:11 2010 +0100

    glu: Fix some compiler warnings in libtess

    When compiled with the more aggressive compiler warnings such as
    -Wshadow and -Wempty-body the libtess code gives a lot more
    warnings. This fixes the following issues:

    * The 'Swap' macro tries to combine multiple statements into one and
      then consume the trailing semicolon by using if(1){/*...*/}else.
      This gives warnings because the else part ends up with an empty
      statement. It also seems a bit dangerous because if the semicolon
      were missed then it would still be valid syntax but it would just
      ignore the following statement. This patch replaces it with the more
      common idiom do { /*...*/ } while(0).

    * 'free' was being used as a local variable name but this shadows the
      global function. This has been renamed to 'free_handle'

    * TRUE and FALSE were being unconditionally defined. Although this
      isn't currently a problem it seems better to guard them with #ifndef
      because it's quite common for them to be defined in other headers.

    https://bugs.freedesktop.org/show_bug.cgi?id=28845

14 years agodocs: Various fixes for gtk-doc
Emmanuele Bassi [Wed, 30 Jun 2010 14:50:47 +0000 (15:50 +0100)]
docs: Various fixes for gtk-doc

14 years agobackend: Move one-off free in finalize()
Emmanuele Bassi [Wed, 30 Jun 2010 14:00:01 +0000 (15:00 +0100)]
backend: Move one-off free in finalize()

Instead of using dispose().

14 years agodocs: Avoid warnings from the g-ir-scanner
Emmanuele Bassi [Wed, 30 Jun 2010 13:58:47 +0000 (14:58 +0100)]
docs: Avoid warnings from the g-ir-scanner

The scanner has some issues when parsing valid gtk-doc annotations; we
should make its (and, in return, ours) life easier.

We still get warnings for code declared in <programlisting> sections,
unfortunately.

14 years agomaterial: Replace CoglHandle with CoglMaterial *
Robert Bragg [Tue, 22 Jun 2010 13:02:17 +0000 (14:02 +0100)]
material: Replace CoglHandle with CoglMaterial *

As part of the ongoing effort to remove CoglHandle from the API this
switches the cogl_material API to use a strongly typed CoglMaterial
pointer instead of CoglHandle.

14 years agomaterial: Split the fragment processing backends out
Robert Bragg [Tue, 15 Jun 2010 15:44:52 +0000 (16:44 +0100)]
material: Split the fragment processing backends out

This splits the fragment processing backends (glsl, arbfp and fixed) out
from cogl-material.c into their own cogl-material-{glsl,arbfp,fixed}.c
files in an effort to help and keep cogl-material.c maintainable.

14 years agomaterial: remove a duplicate gtk-doc "Since: 1.4"
Robert Bragg [Wed, 30 Jun 2010 02:31:37 +0000 (03:31 +0100)]
material: remove a duplicate gtk-doc "Since: 1.4"

The cogl_material_get_depth_writing_enabled documentation had two
"Since: 1.4" annotations which was confusing the gobject introspection
scanner.

14 years agobackend: fix double free of priv->font_name
Robert Bragg [Wed, 30 Jun 2010 10:23:16 +0000 (11:23 +0100)]
backend: fix double free of priv->font_name

If the backend was disposed then priv->font_name would be freed but not
set to NULL and so if clutter_backend_get_font_name was then called it
would double free priv->font_name.

14 years agobuild: Redirect xsltproc to a directory
Emmanuele Bassi [Wed, 30 Jun 2010 12:26:32 +0000 (13:26 +0100)]
build: Redirect xsltproc to a directory

Apparently, xsltproc recognizes a directory if it has a '/' at the end
of its path, and not by doing the sensible thing and stat()'ing the
argument for the --output option.

14 years agoPost-release version bump to 1.3.7
Emmanuele Bassi [Wed, 30 Jun 2010 11:53:20 +0000 (12:53 +0100)]
Post-release version bump to 1.3.7

14 years agoRelease 1.3.6
Emmanuele Bassi [Wed, 30 Jun 2010 10:18:36 +0000 (11:18 +0100)]
Release 1.3.6

14 years agoRevert "build: Enable the cookbook on distcheck"
Emmanuele Bassi [Wed, 30 Jun 2010 11:40:38 +0000 (12:40 +0100)]
Revert "build: Enable the cookbook on distcheck"

The cookbook fails the distcheck phase, so we'll need to investigate
this a little bit more.

This reverts commit f2361a65de090dfe8aa05534cb9bc1c760555084.

14 years agobuild: Distcheck fixes
Emmanuele Bassi [Wed, 30 Jun 2010 10:55:52 +0000 (11:55 +0100)]
build: Distcheck fixes

14 years agodocs: Disable manual
Emmanuele Bassi [Wed, 30 Jun 2010 10:55:16 +0000 (11:55 +0100)]
docs: Disable manual

The manual never really took off, so we just ship it in the tarballs but
we don't build it.

14 years agodocs: Various fixes
Emmanuele Bassi [Wed, 30 Jun 2010 10:30:45 +0000 (11:30 +0100)]
docs: Various fixes

14 years agotest-cogl-path: Add tests for changing the fill rule
Neil Roberts [Wed, 23 Jun 2010 16:17:40 +0000 (17:17 +0100)]
test-cogl-path: Add tests for changing the fill rule

This creates a path with an outer clockwise and two internal sub
paths, one clockwise and one counter-clockwise. The path is then
painted twice, once with each fill rule.

14 years agocogl-path: Allow changing the fill rule
Neil Roberts [Wed, 23 Jun 2010 12:40:43 +0000 (13:40 +0100)]
cogl-path: Allow changing the fill rule

This adds two new API calls- cogl_path_set_fill_rule and
cogl_path_get_fill_rule. This allows modifying the fill rule of the
current path. In addition to the previous default fill rule of
'even-odd' it now supports the 'non-zero' rule. The fill rule is a
property of the path (not the Cogl context) so creating a new path or
preserving a path with cogl_path_get_handle affects the fill rule.

14 years agocogl-debug: Remove the force-scanline-paths option
Neil Roberts [Mon, 19 Apr 2010 10:24:24 +0000 (11:24 +0100)]
cogl-debug: Remove the force-scanline-paths option

The scanline path rasterizer has been removed because the paths can be
drawn with the tesselator instead. The option therefore no longer does
anything.

14 years agocogl-path: Use the GLU tesselator to draw paths
Neil Roberts [Thu, 15 Apr 2010 22:56:46 +0000 (23:56 +0100)]
cogl-path: Use the GLU tesselator to draw paths

Instead of drawing paths using the stencil buffer trick, it now
tesselates the path into triangles using the GLU tesselator and
renders them directly. A vbo is created with one vertex for each node
on the path. The tesselator is used to generate a series of indices
into the vbo as triangles. The tesselator's output of strips and fans
is converted into GL_TRIANGLES so that it can be rendered with a
single draw call (but the vertices are still shared via the
indices). The vbo is stored with the path so that if the application
uses retained paths then Cogl won't have to tessellate again.

The vertices also have texture coordinates associated with them so
that it can replicate the old behaviour of drawing a material with a
texture by fitting the texture to the bounding box of the path and
then clipping it. However if the texture contains waste or is sliced
then the vertex buffer code will refuse to draw it. In this case it
will revert back to drawing the path into the stencil buffer and then
drawing the material as a clipped quad.

The VBO is used even when setting up the stencil buffer for clipping
to a path because the tessellated geometry may cover less area.

The old scanline rasterizer has been removed because the tesselator
should work equally well on drivers with no stencil buffer.

14 years agocogl: Pull in the code for GLU tesselator from Mesa/SGI
Neil Roberts [Thu, 15 Apr 2010 23:28:15 +0000 (00:28 +0100)]
cogl: Pull in the code for GLU tesselator from Mesa/SGI

This copies the files for the GLU tesselator from Mesa. The Mesa code
is based on the original SGI code and is released under a BSD license.

The memalloc.h header has been replaced with one that forces the code
to use g_malloc and friends. The rest of the files are not altered
from the original so it should be possible to later upgrade the files
by simply overwriting them.

There is a tesselator.h header which is expected to be included by
rest of Cogl to use the tesselator. This contains a trimmed down
version of glu.h that only includes parts that pertain to the
tesselator. There is also a stub glu.h in the GL directory which is
just provided so that the tesselator code can include <GL/gl.h>
without depending on the system header. It just redirects to
tesselator.h

14 years agocookbook: Add a recipe for image loading
Elliot Smith [Tue, 29 Jun 2010 14:49:40 +0000 (15:49 +0100)]
cookbook: Add a recipe for image loading

http://bugzilla.clutter-project.org/show_bug.cgi?id=2165

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
14 years agobuild: Enable the cookbook on distcheck
Emmanuele Bassi [Tue, 29 Jun 2010 17:05:12 +0000 (18:05 +0100)]
build: Enable the cookbook on distcheck

We want to start distributing the cookbook along with the documentation.

14 years agocookbook: Add acknowledgment section
Emmanuele Bassi [Tue, 29 Jun 2010 17:04:52 +0000 (18:04 +0100)]
cookbook: Add acknowledgment section

And fix the URLs.

14 years agocookbook: Add introduction to the events section
Emmanuele Bassi [Tue, 29 Jun 2010 16:57:29 +0000 (17:57 +0100)]
cookbook: Add introduction to the events section

14 years agocookbook: Add recipe for key event handling
Elliot Smith [Tue, 29 Jun 2010 16:27:54 +0000 (17:27 +0100)]
cookbook: Add recipe for key event handling

Attached patch contains a cookbook recipe about key press event
handling.

It covers both a simple approach (connecting a callback to a
key-press-event signal which manually analyses the key and
modifiers), and a more complicated one based on a binding pool.

There's also some discussion of the two approaches.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2162

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
14 years agocookbook: Add recipe for scaling images with :keep-aspect-ratio
Elliot Smith [Tue, 29 Jun 2010 16:26:55 +0000 (17:26 +0100)]
cookbook: Add recipe for scaling images with :keep-aspect-ratio

The cookbook contains a commented-out recipe covering scaling images
inside a texture while retaining their aspect ratio; the attached
patch fleshes out this recipe.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2163

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
14 years agoautogen.sh: Support NOCONFIGURE, like gnome-common
Colin Walters [Tue, 29 Jun 2010 15:25:18 +0000 (16:25 +0100)]
autogen.sh: Support NOCONFIGURE, like gnome-common

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
14 years agoevent: Typos in event code could cause crashes
Chris Lord [Tue, 29 Jun 2010 14:30:25 +0000 (15:30 +0100)]
event: Typos in event code could cause crashes

A typo in clutter-event.c meant that the wrong struct location could be
used for the input device of key events. Also, a typo in the X11 event
code meant that key-presses would come from the pointer device (releases
would still come from the keyboard device).

14 years agobind-constraint: Add width and height binding
Emmanuele Bassi [Mon, 28 Jun 2010 16:18:35 +0000 (17:18 +0100)]
bind-constraint: Add width and height binding

Allow using the BindConstraint to bind width and height of a source
actor.

Also, add a test for the BindConstraint showing all types of usages
for this constraint class.

14 years agocogl: Add const to some pointer arguments
Neil Roberts [Mon, 28 Jun 2010 14:25:19 +0000 (15:25 +0100)]
cogl: Add const to some pointer arguments

Some of the arguments to the material and path functions were taking a
pointer to a CoglColor or an array of floats that was not intended to
be written to but were not marked with const.

14 years agotext: Use the ::settings-changed signal
Emmanuele Bassi [Mon, 28 Jun 2010 09:43:13 +0000 (10:43 +0100)]
text: Use the ::settings-changed signal

Instead of the ::font-changed one.

14 years agox11: Add XSETTINGS watcher
Emmanuele Bassi [Mon, 28 Jun 2010 09:32:54 +0000 (10:32 +0100)]
x11: Add XSETTINGS watcher

If we want to be able to get live notification of system settings
changes, we need watch the window that the XSETTINGS client conjures
up for us.

14 years agotext: Document and annotate :font-name for NULL values
Emmanuele Bassi [Sat, 26 Jun 2010 22:05:36 +0000 (23:05 +0100)]
text: Document and annotate :font-name for NULL values

Update the documentation of :font-name, to make it clear that by setting
it to NULL the Text actor will use the default font.

Also, set the annotation for the @font_name argument of the setter to be
allow-none, and allow passing NULL through bindings.

14 years agotext: Update actors using the default font
Emmanuele Bassi [Sat, 26 Jun 2010 14:49:15 +0000 (15:49 +0100)]
text: Update actors using the default font

If a ClutterText actor is using the default font from the backend then
we should track font name changes and update it accordingly. This only
applies to ClutterText actors with the :font-name property unset or
explicitly set to NULL.

14 years agoclutter.modules: Update with the gdk-pixbuf split
Emmanuele Bassi [Sat, 26 Jun 2010 14:42:31 +0000 (15:42 +0100)]
clutter.modules: Update with the gdk-pixbuf split

Gdk-Pixbuf has been split back into its own module once again. This
means that Clutter doesn't have a build requirement on gtk+ any more.

14 years agosettings: Emit Backend::font-changed
Emmanuele Bassi [Sat, 26 Jun 2010 12:51:06 +0000 (13:51 +0100)]
settings: Emit Backend::font-changed

When the :font-name property changes, to maintain the invariant.

14 years agotest-text-field: Use the system font instead of using Sans
Emmanuele Bassi [Fri, 25 Jun 2010 10:41:05 +0000 (11:41 +0100)]
test-text-field: Use the system font instead of using Sans

14 years agoDetail the font-name value in the font settings debug note
Emmanuele Bassi [Fri, 25 Jun 2010 10:40:32 +0000 (11:40 +0100)]
Detail the font-name value in the font settings debug note

14 years agoclutter-event-win32: Emit multiple events for WM_MOUSEWHEEL Messages
Neil Roberts [Thu, 24 Jun 2010 17:14:04 +0000 (18:14 +0100)]
clutter-event-win32: Emit multiple events for WM_MOUSEWHEEL Messages

It's possible that a single WM_MOUSEWHEEL event can arrive with a
scroll amount greater than WHEEL_DELTA. Previously it would accumulate
these amounts but it would still only emit a single event per
message. For example, if a message arrived that is worth two
WHEEL_DELTAs then it would emit one event and leave scroll_pos as
+WHEEL_DELTA. If the wheel is then scrolled in the opposite direction
then wheel delta would end up as zero and the scroll event would get
lost.

This patch fixes it so that it always emits enough events to put
scroll_pos back to less than WHEEL_DELTA.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2135

14 years agoclutter-event-win32: Directly enqueue events in message_translate
Neil Roberts [Thu, 24 Jun 2010 17:07:20 +0000 (18:07 +0100)]
clutter-event-win32: Directly enqueue events in message_translate

Previously the window procedure for the stage window would always
create a ClutterEvent struct for every message and then pass that on
to message_translate to fill in the details. message_translate could
return FALSE to abandon the event. Instead of this, message_translate
now creates and queues the event itself whenever it sees a message
that could translate to an event. The function now returns void. This
has a number of advantages:

* It saves redundantly allocating events for messages that Clutter
  doesn't care about.

* A single message can now easily be translated into multiple events.

* There were some messages that were handled and did not fill in the
  event struct but did not cause the function to return FALSE. I think
  this would end up with a CLUTTER_NOTHING event being emitted.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2135

14 years agostate: avoid g_str_equal if a string might be NULL
Øyvind Kolås [Fri, 25 Jun 2010 01:02:48 +0000 (02:02 +0100)]
state: avoid g_str_equal if a string might be NULL

14 years agotest-conformance: Use -export-dynamic instead of -rdynamic
Neil Roberts [Thu, 24 Jun 2010 16:33:43 +0000 (17:33 +0100)]
test-conformance: Use -export-dynamic instead of -rdynamic

The -rdynamic linker option is specific to ELF so it was breaking
builds on systems with other object formats such as Windows and
Solaris. This patch replaces that option with -export-dynamic which is
a portable libtool option which should do the right thing on each
platform.

http://bugzilla.clutter-project.org/show_bug.cgi?id=1930

14 years agoactor: Top-levels should always report a 255 opacity
Emmanuele Bassi [Thu, 24 Jun 2010 16:21:26 +0000 (17:21 +0100)]
actor: Top-levels should always report a 255 opacity

The paint opacity should always assume a fully opaque top-level at the
end, otherwise the scene would be rendered fully transparent.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2050

14 years agoactor: Ignore the NOP paint at 0 opacity for top-levels
Emmanuele Bassi [Thu, 24 Jun 2010 16:19:36 +0000 (17:19 +0100)]
actor: Ignore the NOP paint at 0 opacity for top-levels

A top-level actor could still have 0 opacity (e.g. a Stage with the
:use-alpha property set to TRUE), but we want its children to still
be painted.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2050

14 years agomaterial: Avoid possibly reading invalid memory
Robert Bragg [Wed, 23 Jun 2010 16:10:03 +0000 (17:10 +0100)]
material: Avoid possibly reading invalid memory

in _cogl_material_prune_empty_layer_difference we sometimes unref the
given layer before dereferencing it to get a pointer to its parent. This
defers the unref until after we have fetched the parent pointer.

14 years agostate: added more documentation
Øyvind Kolås [Thu, 24 Jun 2010 15:52:23 +0000 (16:52 +0100)]
state: added more documentation

14 years agostate: removed special handling of state named "default"
Øyvind Kolås [Thu, 24 Jun 2010 01:26:46 +0000 (02:26 +0100)]
state: removed special handling of state named "default"

The "default" state used for unspecified source transitions is NULL.
Small update and some other fixes to documentation.

14 years agoImprove clutter_text_get_chars doc
Alejandro Piñeiro [Wed, 14 Apr 2010 16:07:21 +0000 (18:07 +0200)]
Improve clutter_text_get_chars doc

Explicitly explain that end_pos is not included with the resulting
string

http://bugzilla.clutter-project.org/show_bug.cgi?id=2081

14 years agodocs: Fix example code in BindingPool
Elliot Smith [Thu, 24 Jun 2010 10:23:50 +0000 (11:23 +0100)]
docs: Fix example code in BindingPool

The code sample in the gtk-doc annotations for ClutterBindingPool shows
the arguments in the wrong order.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2133

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>