Andrej Žnidaršič [Fri, 1 Apr 2011 16:50:58 +0000 (18:50 +0200)]
Updated Slovenian translation
Samuel Degrande [Fri, 25 Mar 2011 11:49:44 +0000 (12:49 +0100)]
Removes the addition of the .exe extension to unit-test scripts, on win32.
On win32, test scripts are created with a .exe extension.
Under mingw, a .exe script is launched in 16 bit compatibility mode (through
ntvdm), and so it just does not run.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2619
Emmanuele Bassi [Fri, 1 Apr 2011 15:31:49 +0000 (16:31 +0100)]
build: Update the release rules
Emmanuele Bassi [Fri, 1 Apr 2011 14:36:22 +0000 (15:36 +0100)]
align-constraint: Fix typo in the vertical align
We're clamping the x1 coordinate to the nearest pixel, instead of doing
so for the y1 coordinate.
Emmanuele Bassi [Fri, 1 Apr 2011 10:43:34 +0000 (11:43 +0100)]
paint-volume: Zero-sized actors don't have paint volume
If an actor has an allocated dimension equal to 0 then it has no paint
volume.
Emmanuele Bassi [Fri, 1 Apr 2011 10:42:41 +0000 (11:42 +0100)]
texture: Add some safeguards for paint volumes of empty textures
If the Texture has no material, and the image size is 0x0 then the actor
doesn't have any paint volume.
Emmanuele Bassi [Thu, 31 Mar 2011 16:12:13 +0000 (17:12 +0100)]
po: Update the PO files
Emmanuele Bassi [Thu, 31 Mar 2011 16:07:08 +0000 (17:07 +0100)]
po: Track Clutter's POT file in Git
If no POT file is found, gettext will automatically create it; this, in
turn, will cause msgmerge to be run, and that will cause the PO files to
be touched and changed at the very first call for `make`.
Having the PO files with unstaged changes will ultimately lead to merge
issues will pulling from the remote repository between releases - unless
`git checkout -f` is called prior to `git pull -r`.
I think intltool only has some rule to avoid that from happening unless
on dist, but I have no intention of dragging intltool into the build of
a library that barely has localized messages.
Matej Urbančič [Wed, 30 Mar 2011 16:36:42 +0000 (18:36 +0200)]
Added Slovenian translation
Piotr Drąg [Tue, 29 Mar 2011 15:40:50 +0000 (17:40 +0200)]
Imported translations from Transifex.net
Piotr Drąg [Tue, 29 Mar 2011 15:25:11 +0000 (17:25 +0200)]
Updated Polish translation
Piotr Drąg [Tue, 29 Mar 2011 13:11:30 +0000 (15:11 +0200)]
Updated POTFILES.in and removed clutter-1.0.pot
Emmanuele Bassi [Mon, 28 Mar 2011 17:36:33 +0000 (18:36 +0100)]
moduleset: Some modules have been moved to gnome.org
So we need to update the moduleset.
Emmanuele Bassi [Thu, 24 Mar 2011 14:13:59 +0000 (14:13 +0000)]
build: Fix previous commit
The previous commit broke the backend-specific required pkg-config
packages.
Emmanuele Bassi [Tue, 22 Mar 2011 17:18:07 +0000 (17:18 +0000)]
build: Remove bash-isms
Emmanuele Bassi [Tue, 22 Mar 2011 17:10:49 +0000 (17:10 +0000)]
build: Use AC_CANONICAL_HOST
Since we're checking the value of the $host variable, it's a good idea
to use the canonicalization support in autoconf.
Emmanuele Bassi [Tue, 22 Mar 2011 14:46:35 +0000 (14:46 +0000)]
doap: Fix the categories
Emmanuele Bassi [Mon, 21 Mar 2011 12:41:40 +0000 (12:41 +0000)]
drag-action: Fix a compiler warning
Use arguments of the right signedness when passing pointers.
Emmanuele Bassi [Mon, 21 Mar 2011 12:34:41 +0000 (12:34 +0000)]
Merge remote-tracking branch 'elliot/cookbook-effects-basic'
* elliot/cookbook-effects-basic:
docs: Remove checks for whether an effect is disabled
docs: Add recipe about implementing a ClutterEffect
docs: Add example of setting background color with ClutterEffect
docs: Add example of a border added through ClutterEffect
Neil Roberts [Fri, 18 Mar 2011 14:09:57 +0000 (14:09 +0000)]
clutter-clone: Make clutter_clone_get_paint_volume static
clutter_clone_get_paint_volume was being exported from the shared
library because the function wasn't declared static. This function
shouldn't be exposed because it should be accessed through
clutter_actor_get_paint_volume.
Elliot Smith [Thu, 17 Mar 2011 15:45:57 +0000 (15:45 +0000)]
docs: Remove checks for whether an effect is disabled
pre_paint() and post_paint() implementations don't need
to check whether an effect is disabled: Clutter will
not apply an effect unless it is enabled.
So remove code which checks whether the effect is
enabled or disabled from the example applications and the
documentation.
Elliot Smith [Wed, 16 Mar 2011 17:44:44 +0000 (17:44 +0000)]
docs: Add recipe about implementing a ClutterEffect
Add a recipe showing how to implement two simple
effects, based on ClutterEffect: an always gray background,
and a border with configurable width and color.
Also explains the necessity to queue a redraw on
the associated actor if the effect's properties change,
and shows how to implement that.
The example gives the GObject code for both effects,
as well as an example application showing how to use them.
The example also demonstrates how to disable/enable an effect,
making the border round an actor togglable.
Elliot Smith [Tue, 8 Mar 2011 14:54:00 +0000 (14:54 +0000)]
docs: Add example of setting background color with ClutterEffect
Add example of a simple background color effect applied via
pre_paint() implementation in a ClutterEffect subclass.
This is a simple effect with an incomplete GObject
implementation (no properties, setters or getters)
to make it as easy to follow as possible.
Elliot Smith [Tue, 8 Mar 2011 11:19:13 +0000 (11:19 +0000)]
docs: Add example of a border added through ClutterEffect
Add a basic example showing how to implement a ClutterEffect
post_paint() function to overlay a highlight border over a
rectangular actor.
Neil Roberts [Tue, 15 Mar 2011 16:20:34 +0000 (16:20 +0000)]
clutter-offscreen-effect: Paint with 'nearest' texture filter mode
The texture containing the image for the redirected actor will always
be painted at a 1:1 texel:pixel ratio so there's no need to use linear
filtering. This should also counteract some of the effects of rounding
errors when calculating the geometry for the quad.
Emmanuele Bassi [Mon, 14 Mar 2011 16:02:13 +0000 (16:02 +0000)]
docs: Update RELEASING
Neil Roberts [Wed, 16 Mar 2011 12:27:22 +0000 (12:27 +0000)]
mingw-fetch-dependencies.sh: Add a wrapper for pkg-config
On a Fedora system (and maybe others) there is a wrapper script called
i686-pc-mingw32-pkg-config. This script unsets the PKG_CONFIG_PATH
variable and then sets the PKG_CONFIG_LIBDIR variable so that it won't
pick up the native system .pc files. This breaks cross compiling in
mingw-fetch-dependencies.sh because it ends up removing its attempts
to set a local search path.
To fix this, the mingw-fetch-dependencies script now generates its own
wrapper script which instead sets PKG_CONFIG_LIBDIR to the local
clutter-cross prefix and then runs the original pkg-config program
from the search path. This should have the same benefit of preventing
it from finding native system .pc files on systems that don't provide
a cross pkg-config. The cross compiling for json-glib and the
recommend args to pass to configure when building clutter are updated
to set the PKG_CONFIG varible to point to this wrapper script.
Robert Bragg [Tue, 15 Mar 2011 23:28:27 +0000 (23:28 +0000)]
win32: remove env.sh generated by mingw-fetch-dependencies.sh
Since there is very little now left in the env.sh file generated by
mingw-fetch-dependencies.sh it can be removed. What remained (The
CFLAGS="-mms-bitfields" and PKG_CONFIG_PATH=$ROOT_DIR/lib/pkgconfig) can
simply be passed explicitly when calling ./configure.
Robert Bragg [Tue, 15 Mar 2011 22:47:20 +0000 (22:47 +0000)]
win32: remove deprecated -mno-cygwin options from env.sh
This removes the use of -mno-cygwin from our generated env.sh for cross
compiling with mingw.
I don't know that anyone is building clutter under cygwin, and our
BuildingClutterOnWindows wiki page only describes building with msys not
cygwin so I think its fair to assume that this build configuration is
untested and thus not supported by us currently. Since the -mno-cygwin
option is deprecated it could well be that there is a better
cross-compilation solution available for cygwin these days if you want
to build programs that don't depend on cygwin libraries.
Robert Bragg [Tue, 15 Mar 2011 22:37:04 +0000 (22:37 +0000)]
win32: Strip unneeded flags from env.sh
This remove CXXFLAGS since we don't have any c++ code in Clutter and
also removes the redundant -L$ROOT_DIR/lib from LDFLAGS and
-I$ROOT_DIR/include from CPPFLAGS and CFLAGS. (These should get added by
pkg-config)
Robert Bragg [Tue, 15 Mar 2011 22:19:08 +0000 (22:19 +0000)]
win32: Add blurb at end of mingw helper script
This adds some blurb at the end the mingw-fetch-dependencies.sh script
that gives an example of how to go on and build clutter after fetching
all dependencies.
Robert Bragg [Tue, 15 Mar 2011 21:58:15 +0000 (21:58 +0000)]
win32: support building json-glib in mingw script
Since Tor does not currently provide win32 binaries for json-glib we
need to cross compile it before we can build clutter. This extends
mingw-fetch-dependencies.sh so it can fetch, unpack and cross-compile
json-glib into the same prefix as the binary dependencies.
Robert Bragg [Tue, 15 Mar 2011 20:17:21 +0000 (20:17 +0000)]
win32: don't set CC,CPP,AR,NM,LD etc in mingw env.sh
It shouldn't be necessary to explicitly override CC,CPP,AR,NM,LD etc in
the env.sh helper script that mingw-fetch-dependencies.sh generates.
Clutter's ./configure script should figure all of those out for us.
Robert Bragg [Tue, 15 Mar 2011 20:04:15 +0000 (20:04 +0000)]
win32: remove automatic build option from mingw script
This removes the "Do you want to checkout and build Clutter?" option
from the mingw-cross-compile.sh script and renames the script
mingw-fetch-dependencies.sh
As it stands the mingw-cross-compile.sh script isn't enough to fetch all
the dependencies for building clutter, since Tor doesn't provide binaries
for json-glib so the option to checkout and build clutter can't work.
Also it doesn't seem ideal to clone a fresh clutter repo instead of
being able to compile the source of the current repo.
Robert Bragg [Tue, 15 Mar 2011 19:37:26 +0000 (19:37 +0000)]
win32: mkdir -p win32 needed for out of tree builds
if cross compiling clutter using mingw using an out of tree build
directory then a pre-requisite for creating the resources.o file
containing the transparent cursor is for the win32 directory itself to
be created at $(top_builddir)/clutter/win32.
Neil Roberts [Mon, 14 Mar 2011 17:58:31 +0000 (17:58 +0000)]
cogl: Use GHookList instead of CoglCallbackList
glib already has a data type to manage a list of callbacks called a
GHookList so we might as well use it instead of maintaining Cogl's own
type. The glib version may be slightly more efficient because it
avoids using a GList and instead encodes the prev and next pointers
directly in the GHook structure. It also has more features than
CoglCallbackList.
Emmanuele Bassi [Mon, 14 Mar 2011 14:17:14 +0000 (14:17 +0000)]
clutter.doap: Add my gnome userid
Not strictly needed, since we're not hosted on GNOME, but it can still
be useful when extracting meta-data from the DOAP file.
Emmanuele Bassi [Mon, 14 Mar 2011 14:16:16 +0000 (14:16 +0000)]
AUTHORS: Note that the file is unmaintained
The list of authors can be extracted from the Git log; the AUTHORS file
is maintained for mere historical reasons.
Emmanuele Bassi [Mon, 14 Mar 2011 14:00:12 +0000 (14:00 +0000)]
README.md: fix a dumb typo
Emmanuele Bassi [Mon, 14 Mar 2011 13:57:26 +0000 (13:57 +0000)]
Add MarkDown version of the README
Øyvind Kolås [Fri, 11 Mar 2011 17:09:59 +0000 (17:09 +0000)]
stage: handle ACCEPT_FOCUS in set_/get_property
Robert Bragg [Thu, 10 Mar 2011 18:51:51 +0000 (18:51 +0000)]
culling: Don't cull actors not being painted on the stage
Previously we were applying the culling optimization to any actor
painted without considering that we may be painting to an offscreen
framebuffer where the stage clip isn't applicable.
For now we simply expose a getter for the current draw framebuffer
and we can assume that a return value of NULL corresponds to the
stage.
Note: This will need to be updated as stages start to be backed by real
CoglFramebuffer objects and so we won't get NULL in those cases.
Robert Bragg [Thu, 10 Mar 2011 18:50:23 +0000 (18:50 +0000)]
debug: Add more CLIPPING debug notes
To give quick visibility to the things going on relating to clipping and
culling this adds some more CLIPPING debug notes to clutter-actor.c and
clutter-stage.c
Robert Bragg [Thu, 10 Mar 2011 13:42:11 +0000 (13:42 +0000)]
culling: check volume->is_empty before ->is_complete
As documented in cogl-pipeline-private.h, there is a precedence to the
ClutterPaintVolume bitfields that should be considered whenever we
implement code that manipulates PaintVolumes...
Firstly if ->is_empty == TRUE then the values for ->is_complete and
->is_2d are undefined, so we should typically check ->is_empty as the
first priority.
This fixes a bug in _clutter_paint_volume_cull() whereby we were
checking pv->is_complete before checking pv->is_empty which was
resulting in assertions for actors with no size.
Jasper St. Pierre [Wed, 2 Mar 2011 17:45:25 +0000 (12:45 -0500)]
cogl-clip-state: Adapt to experimental cogl2 API.
The current clip state implementation couldn't be used in
conjunction with the CoglPath experimental API.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2594
Signed-off-by: Neil Roberts <neil@linux.intel.com>
Neil Roberts [Wed, 9 Mar 2011 17:46:23 +0000 (17:46 +0000)]
cogl-path: Optimise paths that are just a rectangle
Drawing and clipping to paths is generally quite expensive because the
geometry has to be tessellated into triangles in a single VBO which
breaks up the journal batching. If we can detect when the path
contains just a single rectangle then we can instead divert to calling
cogl_rectangle which will take advantage of the journal, or by pushing
a rectangle clip which usually ends up just using the scissor.
This patch adds a boolean to each path to mark when it is a
rectangle. It gets cleared whenever a node is added or gets set to
TRUE whenever cogl2_path_rectangle is called. This doesn't try to
catch cases where a rectangle is composed by cogl_path_line_to and
cogl_path_move_to commands.
Emmanuele Bassi [Mon, 28 Feb 2011 17:47:50 +0000 (17:47 +0000)]
drag-action: Allow using settings for the drag threshold
ClutterDragAction should be able to use the newly added ClutterSettings
property exposing the system's drag threshold.
Currently, the x-drag-threshold and the y-drag-threshold properties (and
relative accessors) use an unsigned integer for their values; we should
be able to safely expand the range to include -1 as the minimum value,
and use this new value to tell the ClutterDragAction that it should query
the ClutterSettings object for the drag threshold.
The storage of the properties has been changed, albeit in a compatible
way, as GObject installs a uint ↔ int transformation function for GValue
automatically.
The setter for the drag thresholds has been changes to use a signed
integer, but the getter has been updated to always Do The Right Thing™:
it never returns -1 but, instead, will return the valid drag threshold,
either from the value set or from the Settings singleton.
This change is ABI compatible.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2583
Emmanuele Bassi [Mon, 28 Feb 2011 16:08:23 +0000 (16:08 +0000)]
x11: Map Net/DndDragThreshold to ClutterSettings
Simple mapping between XSETTINGS key and ClutterSettings property.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2583
Emmanuele Bassi [Mon, 28 Feb 2011 16:46:27 +0000 (16:46 +0000)]
settings: Add dnd-drag-threshold property
The newly added ClutterSettings:dnd-drag-threshold stores the
threshold, in pixels, that should be passed by the cursor to
start a drag operation.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2583
Emmanuele Bassi [Mon, 28 Feb 2011 16:40:07 +0000 (16:40 +0000)]
settings: Clean up property installation code
Use g_object_class_install_properties().
http://bugzilla.clutter-project.org/show_bug.cgi?id=2583
Emmanuele Bassi [Wed, 9 Mar 2011 12:05:34 +0000 (12:05 +0000)]
docs: Add an ClutterState definition section
ClutterState is missing some documentation on how to define transitions
using ClutterScript definitions; it is also missing some example code
for both the C API and the ClutterScript syntax.
Emmanuele Bassi [Tue, 8 Mar 2011 19:23:34 +0000 (19:23 +0000)]
box: Implement the correct paint volume
The allocation of the ClutterBox is not enough to be used as the paint
volume, because children might decide to paint outside that area.
Instead, we should use the allocation if the Box has a background color
and then do what Group does, and union all the paint volumes of the
children.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2600
Neil Roberts [Tue, 8 Mar 2011 12:53:41 +0000 (12:53 +0000)]
cogl-shader-boilerplate: Specify default precision earlier
In
9ff04e8a99 the builtin uniforms were moved to the common shader
boilerplate. However the common boilerplate is positioned before the
default precision specifier on GLES2 so it would fail to compile
because the uniforms end up with no precision in the fragment
shader. This patch just moves the precision specifier to above the
common boilerplate.
Emmanuele Bassi [Tue, 8 Mar 2011 10:05:57 +0000 (10:05 +0000)]
event: Return the CrossingEvent.device field
The CLUTTER_ENTER and CLUTTER_LEAVE event types were mistakenly ignored
by clutter_event_get_device(), when returning the device from a
non-allocated ClutterEvent.
Emmanuele Bassi [Tue, 8 Mar 2011 10:01:53 +0000 (10:01 +0000)]
win32/event: Set the core pointer directly
Since we have a ClutterInputDevice pointer already we can just set it
instead of using event->crossing.device.
Emmanuele Bassi [Tue, 8 Mar 2011 10:01:06 +0000 (10:01 +0000)]
event: Set the CrossingEvent device field
The CLUTTER_ENTER and CLUTTER_LEAVE should also have their device field
set when calling clutter_event_set_device().
Neil Roberts [Mon, 7 Mar 2011 15:35:05 +0000 (15:35 +0000)]
clutter-actor: Fix test for avoiding calculating the paint volume
There's an optimisation in clutter-actor.c to avoid calculating the
last known paint volume whenever culling and clipped redraws are both
disabled. However there was a small thinko in the logic so that it
would also avoid calculating the paint volume whenever only one of the
debug flags is enabled. This fixes it to explicitly check that the two
flags are not both enabled before skipping the paint volume
calculation.
Robert Bragg [Tue, 8 Feb 2011 10:37:15 +0000 (10:37 +0000)]
util: optimize _clutter_util_fully_transform_vertices
Instead of unconditionally combining the modelview and projection
matrices and then iterating each of the vertices to call
cogl_matrix_transform_point for each one in turn we now only combine the
matrices if there are more than 4 vertices (with less than 4 vertices
its less work to transform them separately) and we use the new
cogl_vertex_{transform,project}_points APIs which can hopefully
vectorize the transformations.
Finally the perspective divide and viewport scale is done in a separate
loop at the end and we don't do the spurious perspective divide and
viewport scale for the z component.
Robert Bragg [Fri, 4 Feb 2011 09:17:16 +0000 (09:17 +0000)]
actor: Cache per-actor transforms
Previously each time we needed to retrieve the model transform for a
given actor we would call the apply_transform vfunc which would build up
a transformation matrix based on the actor's current anchor point, its
scale, its allocation and rotation. The apply_transform implementation
would repeatedly call API like cogl_matrix_rotate, cogl_matrix_translate
and cogl_matrix_scale.
All this micro matrix manipulation APIs were starting to show up in the
profiles of dynamic applications so this adds priv->transform matrix
cache which maintains the combined result of the actors scale, rotation
and anchor point etc. Whenever something like the rotation changes then
then the matrix is marked as dirty, but so long as the matrix isn't
dirty then the apply_transform vfunc now just calls cogl_matrix_multiply
with the cached transform matrix.
Robert Bragg [Tue, 1 Feb 2011 18:32:08 +0000 (18:32 +0000)]
Optimize culling by doing culling in eye-coordinates
This implements a variation of frustum culling whereby we convert screen
space clip rectangles into eye space mini-frustums so that we don't have
to repeatedly transform actor paint-volumes all the way into screen
coordinates to perform culling, we just have to apply the modelview
transform and then determine each points distance from the planes that
make up the clip frustum.
By avoiding the projective transform, perspective divide and viewport
scale for each point culled this makes culling much cheaper.
Robert Bragg [Tue, 8 Feb 2011 14:46:31 +0000 (14:46 +0000)]
stage: simplify apply_transform
This simplifies the implementation of the ClutterStage apply_transform
vfunc by using the new cogl_matrix_view_2d_in_perspective utility API
which can setup up a view transform for a given perspective so that a
cross section of the view frustum at an arbitrary depth can be mapped
directly to 2D stage coordinates with (0,0) at the top left.
Robert Bragg [Tue, 8 Feb 2011 15:21:41 +0000 (15:21 +0000)]
matrix: adds 2d view transform conveniences
This adds two new experimental functions to cogl-matrix.c:
cogl_matrix_view_2d_in_perspective and cogl_matrix_view_2d_in_frustum
which can be used to setup a view transform that maps a 2D coordinate
system (0,0) top left and (width,height) bottom right to the current
viewport.
Toolkits such as Clutter that want to mix 2D and 3D drawing can use
these APIs to position a 2D coordinate system at an arbitrary depth
inside a 3D perspective projected viewing frustum.
Robert Bragg [Tue, 1 Feb 2011 18:15:50 +0000 (18:15 +0000)]
stage: don't call glGetIntegerv in clutter_stage_read_pixels
Firstly Clutter shouldn't be using OpenGL directly so this needed
changing but also conceptually it doesn't make sense for
clutter_stage_read_pixels to validate the requested area to read against
the viewport it would make more sense to compare against the window
size. Finally checking that the width of the area is less than the
viewport or window width without considering the x isn't enough to know
if the area extends outside the windows bounds. (same for the height)
This patch removes the validation of the read area from
clutter_stage_read_pixels and instead we now simply rely on the
semantics of cogl_read_pixels for reading areas outside the window
bounds.
Robert Bragg [Tue, 1 Feb 2011 16:51:58 +0000 (16:51 +0000)]
viewport: consistently use floats for viewports
OpenGL < 4.0 only supports integer based viewports and internally we
have a mixture of code using floats and integers for viewports. This
patch switches all viewports throughout clutter and cogl to be
represented using floats considering that in the future we may want to
take advantage of floating point viewports with modern hardware/drivers.
Robert Bragg [Thu, 3 Mar 2011 23:19:30 +0000 (23:19 +0000)]
util: tune point_in_poly test for polys in screen coords
This makes a change to the original point_in_poly algorithm from:
http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html
The aim was to tune the test so that tests against screen aligned
rectangles are more resilient to some in-precision in how we transformed
that rectangle into screen coordinates. In particular gnome-shell was
finding that for some stage sizes then row 0 of the stage would become a
dead zone when going through the software picking fast-path and this was
because the y position of screen aligned rectangles could end up as
something like 0.00024 and the way the algorithm works it doesn't have
any epsilon/fuz factor to consider that in-precision.
We've avoided introducing an epsilon factor to the comparisons since we
feel there's a risk of changing some semantics in ways that might not be
desirable. One of those is that if you transform two polygons which
share an edge and test a point close to that edge then this algorithm
will currently give a positive result for only one polygon.
Another concern is the way this algorithm resolves the corner case where
the horizontal ray being cast to count edge crossings may cross directly
through a vertex. The solution is based on the "idea of Simulation of
Simplicity" and "pretends to shift the ray infinitesimally down so that
it either clearly intersects, or clearly doesn't touch". I'm not
familiar with the idea myself so I expect a misplaced epsilon is likely
to break that aspect of the algorithm.
The simple solution this patch applies is to pixel align the polygon
vertices which should eradicate most noise due to in-precision.
https://bugzilla.gnome.org/show_bug.cgi?id=641197
Emmanuele Bassi [Fri, 4 Mar 2011 23:58:12 +0000 (23:58 +0000)]
glx: Use g_set_error_literal() where appropriate
Emmanuele Bassi [Fri, 4 Mar 2011 23:56:12 +0000 (23:56 +0000)]
On error, return FALSE in the post_parse hook
Anything that is not CLUTTER_INIT_SUCCESS is to be considered an error.
This fixes the Clutter initialization sequence to actually error out
on pre-conditions and backend initialization failures.
Emmanuele Bassi [Fri, 4 Mar 2011 23:55:02 +0000 (23:55 +0000)]
Clean up argument parsing GError handling
Pass a GError in, so that clutter_init() can effectively print out a
critical warning on initialization failure, like it used to do in the
olden days.
Emmanuele Bassi [Fri, 4 Mar 2011 23:53:45 +0000 (23:53 +0000)]
x11: Use g_set_error_literal()
The g_set_error() function takes a format string.
Neil Roberts [Fri, 4 Mar 2011 17:04:02 +0000 (17:04 +0000)]
clutter-offscreen-effect: Use 0,0 as the offset if no actor box
clutter_offscreen_effect_pre_paint was using the unitialized value of
the ‘box’ variable whenever the actor doesn't have a paint
volume. This patch makes it just set the offset to 0,0 instead.
Neil Roberts [Thu, 3 Mar 2011 16:46:26 +0000 (16:46 +0000)]
clutter-offscreen-effect: Preserve the old opacity override
When removing the opacity override in the post_paint implementation,
ClutterOffscreenEffect would always set the override back to -1. This
ends up cancelling out the effect of any overrides from outer effects
which means that if any actor has multiple effects attached then it
would apply the opacity multiple times.
To fix this, the effect now preserves the old value of the opacity
override and restores that instead of setting -1.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2541
Neil Roberts [Tue, 1 Mar 2011 19:52:43 +0000 (19:52 +0000)]
clutter-actor: Add an internal _clutter_actor_get_opacity_override
This is needed if an effect wants to temporarily override the paint
opacity. It needs to be able to restore the old opacity override in
the post_paint handler otherwise it would replace the effect of the
opacity override from any outer effects.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2541
Jasper St. Pierre [Thu, 3 Mar 2011 11:35:46 +0000 (06:35 -0500)]
Remove private helper #define's
Finish off the second half of
09a830d294.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2596
Dioselin [Tue, 1 Mar 2011 22:05:11 +0000 (14:05 -0800)]
box: set default paint volume to allocation
http://bugzilla.clutter-project.org/show_bug.cgi?id=2589
Emmanuele Bassi [Tue, 1 Mar 2011 18:36:55 +0000 (18:36 +0000)]
effect: Queue a redraw on :enabled changes
ClutterEffect should queue a redraw if the :enabled property of its
parent class ClutterActorMeta changes.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2587
Emmanuele Bassi [Tue, 1 Mar 2011 18:36:08 +0000 (18:36 +0000)]
constraint: Queue a relayout on :enabled changes
ClutterConstraint should queue a relayout if the :enabled property of
its parent class ClutterActorMeta changes.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2587
Emmanuele Bassi [Mon, 28 Feb 2011 14:31:59 +0000 (14:31 +0000)]
offscreen-effect: Add public accessor for target size
The OffscreenEffect class needs to expose a way for sub-classes to
track the size of FBO it creates, in case it has to do some geometry
deformations like the DeformEffect sub-classes.
Let's move the private symbol we used internally in 1.6 to fix
DeformEffect to the list of public symbols of OffscreenEffect.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2570
Emmanuele Bassi [Mon, 28 Feb 2011 14:02:00 +0000 (14:02 +0000)]
Move the keysym ↔ Unicode table to .rodata
The table we use for converting between keysyms and Unicode should be
static and constified, so that it can live in the .rodata section of
the ELF shared object, and be shared among processes.
This change moves the table to a source file, instead of an header; the
change also requires the clutter_keysym_to_unicode() function to be
moved from clutter-event.c into this new source file. The declaration is
still in clutter-event.h, so we don't need to do anything special.
Emmanuele Bassi [Mon, 28 Feb 2011 12:49:48 +0000 (12:49 +0000)]
build: Show CFLAGS in the configure summary
Don't show just the maintainer flags, but the whole shebang.
Emmanuele Bassi [Tue, 22 Feb 2011 17:12:34 +0000 (17:12 +0000)]
event: Add setters for ClutterEvent members
Creating a synthetic event requires direct access to the ClutterEvent
union members; this access does not map in bindings to high-level
languages, especially run-time bindings using GObject-Introspection.
It's also midly annoying from C, as it unnecessarily exposes the guts of
ClutterEvent - something we might want to fix in the future.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2575
Neil Roberts [Tue, 22 Feb 2011 12:53:15 +0000 (12:53 +0000)]
tests: Check return value of clutter_init_with_args instead of error
Some of the tests were ignoring the return value of
clutter_init_with_args and instead they would recognise an error by
seeing whether the GError parameter was set. This patch changes it to
check the return value so that it won't give a warning now that
G_GNUC_WARN_UNUSED_RESULT is on that function.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2574
Neil Roberts [Tue, 22 Feb 2011 12:38:19 +0000 (12:38 +0000)]
Add G_GNUC_WARN_UNUSED_RESULT to clutter_init and init_with_args
Many people expect clutter_init to work the same way as gtk_init which
exits the program on init failure. clutter_init however returns a
status code on failure which applications need to handle because if
the init fails then any further Clutter calls are likely to crash. In
Clutter 2.0 we may want to change this to be more like GTK+.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2574
nobled [Tue, 22 Feb 2011 00:44:55 +0000 (00:44 +0000)]
doc: fix clutter_init() usage in examples
Make sure users get the idea that clutter_init()
has a return value that needs to be checked.
These were fixed via sed magic:
sed -i -s -e "s/clutter_init (.*)/\
if (& != CLUTTER_INIT_SUCCESS)\n return 1/"\
doc/*/*/*.{c,xml} doc/*/*.xml
http://bugzilla.clutter-project.org/show_bug.cgi?id=2574
nobled [Tue, 22 Feb 2011 00:19:35 +0000 (00:19 +0000)]
tests: abort if clutter_init fails
This fixes segfaults when something goes wrong during
init, but the test keeps going anyway.
Except for test-easing and test-picking, these were fixed by
sed magic:
sed -i -s -e "s/clutter_init \?(&argc, &argv)/\
if (clutter_init (\&argc, \&argv) != CLUTTER_INIT_SUCCESS)\n\
return 1/" tests/*/*.c
http://bugzilla.clutter-project.org/show_bug.cgi?id=2574
Emmanuele Bassi [Mon, 28 Feb 2011 11:24:14 +0000 (11:24 +0000)]
Start 1.7 development cycle
Neil Roberts [Thu, 24 Feb 2011 20:30:30 +0000 (20:30 +0000)]
Add a conformance test for atlas migration
This adds a conformance test which creates a lot of textures with
increasing size and destroys them again a number of times in order to
cause a few atlas migrations. The last time the textures are created
they are all read back and the data is verified to confirm that the
atlas migration successfully preserved the data.
Neil Roberts [Thu, 24 Feb 2011 18:42:47 +0000 (18:42 +0000)]
cogl-blit: Disable blending when using texture render
When using a pipeline and the journal to blit images between
framebuffers, it should disable blending. Otherwise it will end up
blending the source texture with uninitialised garbage in the
destination texture.
Emmanuele Bassi [Wed, 23 Feb 2011 00:07:12 +0000 (00:07 +0000)]
build: Remove MAINTAINERCLEANFILES from ChangeLog rules
Emmanuele Bassi [Tue, 22 Feb 2011 18:32:01 +0000 (18:32 +0000)]
build: Remove maintainer-clean rule
The maintainer-clean files list is horribly out of date, nobody is
maintaining it, and it's honestly easier to use `git clean -xdf`
instead to clean untracked files.
Emmanuele Bassi [Mon, 21 Feb 2011 18:09:06 +0000 (18:09 +0000)]
Merge remote-tracking branch 'elliot/cookbook-effects-custom-deform'
* elliot/cookbook-effects-custom-deform:
docs: Add effects chapter, with introduction and first recipe
Emmanuele Bassi [Mon, 21 Feb 2011 17:13:37 +0000 (17:13 +0000)]
text: Round up the size
Converting from Pango units to pixels by using the C conventions might
cause us to lose a pixel; since we're doing the same for the height, we
should use ceilf() to round up the width and the line height.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2573
Elliot Smith [Mon, 21 Feb 2011 16:43:34 +0000 (16:43 +0000)]
docs: Add effects chapter, with introduction and first recipe
Add an effects chapter which gives a broad overview of
the abstract classes in the effects API, plus a short
example of how to apply one of the stock Clutter
effects (ClutterColorizeEffect).
The recipe explains how to create a custom ClutterDeformEffect
to produce a page fold (code based on ClutterPageTurnEffect).
The example code includes the effect class plus a small
application to apply it to a texture.
Emmanuele Bassi [Mon, 21 Feb 2011 16:41:28 +0000 (16:41 +0000)]
docs: Mention the cookbook in the README
In the "Resources" section, along with the API references.
Emmanuele Bassi [Mon, 21 Feb 2011 16:40:50 +0000 (16:40 +0000)]
docs: Remove last mention of SDL from the README
We don't support SDL since forever, now. Just get rid of it, before it
confuses somebody.
Emmanuele Bassi [Mon, 21 Feb 2011 14:19:47 +0000 (14:19 +0000)]
Post-release version bump to 1.6.7
Emmanuele Bassi [Mon, 21 Feb 2011 12:47:09 +0000 (12:47 +0000)]
Release Clutter 1.6.6 (stable)
Emmanuele Bassi [Mon, 21 Feb 2011 12:46:34 +0000 (12:46 +0000)]
build: Use all-am, not all as the gitignore target
Emmanuele Bassi [Sat, 19 Feb 2011 16:48:59 +0000 (16:48 +0000)]
device-manager/xi2: Silence a compiler warning
Emmanuele Bassi [Sat, 19 Feb 2011 16:46:44 +0000 (16:46 +0000)]
tests: Remove unused variables
Emmanuele Bassi [Sat, 19 Feb 2011 16:45:51 +0000 (16:45 +0000)]
test-timeline: Ignore the default stage
We need to create the default stage to have the master clock spin, but
we can tell the compiler that the returned value is meaningless.