The INCLUDES directive should only contain pre-processor flags, since
we're passing it also to the introspection scanner.
Using AM_CFLAGS for compiler flags, like debug flags and maintainer
flags, is more indicated.
Bug 1442 - multistage, same-window resize events invalidate stage
When ensuring that the GL context is attached to the correct
ClutterStage we need to set the SYNC_MATRICES flag on the stage
itself. This is needed in case the size of the new stage does
not match the size of the old -- thus requiring a call to
glViewport() when the paint cycle starts.
cogl_wrap_glActiveTexture needs to call the GL version of
glActiveTexture otherwise the subsequent calls to glBindTexture will
all be using texture unit 0. This fixes test-cogl-multitexture.
Previously the texture unit settings were stored in growable GArrays
and every time a new texture unit was encountered it would expand the
arrays. However the array wasn't copied when stored in a
CoglGles2WrapperSettings struct so all settings had the same
array. This meant that it wouldn't detect that a different program is
needed if a texture unit is disabled or enabled.
The texture unit settings arrays are all now a fixed size and the
enabledness of each unit is stored in a bit mask. Therefore the
settings can just be copied around by assignment as before.
This puts a limit on the number of texture units accessible by Cogl
but I think it is worth it to make the code simpler and more
efficient. The material API already poses a limit on the number of
texture units it can use.
configure.ac: Check for gobject-introspection
build/introspection.m4: Include the file that defines the
GOBJECT_CHECK_INTROSPECTION m4 macro in case we want to disable
the introspection data generation.
clutter/json/Makefile.am: Build the .gir for "ClutterJson"
(json-glib as part of the Clutter library)
clutter/Makefile.am: Build the .gir for clutter, compile the
Clutter and ClutterJson girs into typelibs, and install them.
Also move GCC_FLAGS from $(INCLUDES) to $(AM_CFLAGS) since it includes
non-preprocessor flag like -Wall.
See also:
http://bugzilla.openedhand.com/show_bug.cgi?id=1450
Based on a patch by: Owen W. Taylor <otaylor@fishsoup.net>
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
Add annotations such as (transfer-none) (out) (element-type ClutterActor),
and so forth to the doc comments as appropriate.
The annotations added here are a combination of the annotations previously
in gir-repository for Clutter and annotations found in a review of all
return values with that were being parsed with a transfer of "full".
http://bugzilla.openedhand.com/show_bug.cgi?id=1452
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
The new stable release of gtk-doc provides the --name-space
option for the mkdb utility. This option allows to specify a
namespace for the symbols that will get stripped, so that we
don't get a symbols index containing only "C".
Bug 1464 - clutter_timeline_list_markers should set n_markers=0 when
there are no markers
If no markers are registered and we bail out we should also set the
n_markers out parameter to 0 so that code checking the number of
markers will still work.
Bug 1465 - clutter_path_parse_description should check p==NULL
When accepting a stringified path description, ClutterPath methods
and the parser should not accept NULL or empty strings.
Bug 1463 - clutter_color_lighten(darken) unexpected because of
ClutterFixed=>float
These two functions contained ClutterFixed constants represented as
integers which are no longer valid since the cogl-float branch
merge. They are now converted to ClutterFixed from float constants
using CLUTTER_FLOAT_TO_FIXED (which is now a no-op).
Thanks to Zhang Wei for reporting.
The ChangeLog should only be generated by dist-hook and as a temporary
file to avoid overwriting the stub we use to direct people to the
commit log when cloning the repository.
When generated, the ChangeLog should be copied inside the distdir so
that the autotools will not freak out.
The TEST_CONFORM_TODO macro is a simple placeholder macro that
adds the test function to the "/todo" namespace and skips the
test.
It can be used for tests that are known to fail because of bugs
that haven't been fixed yet, or because of features not yet
implemented.
test-vertex-buffer-configuous now needs redhand.png so it should be
copied in to the build directory. This is copied from similar code in
the tests/interactive Makefile.
This causes clutter to skip all the GL work of state changes and
texturing if the opacity was 0. This is done in ClutterTexture and not
ClutterActor to ensure that pre and post paint signals work correctly.
Other expensive actors should be doing the same thing.
The call to "cmp" to compare a built file with its current version
should use the -s (silent) command line switch. This avoids a ugly
message on the console when building Clutter the first time.
When setting the COGL texture handle for a ClutterTexture the
texture will be set as the first layer of the material used
by the ClutterTexture. The documentation should clarify this
point.
The :texture and :material properties of ClutterTexture use a
Clutter-provided GType shielding from CoglHandle. Since CoglHandle
now has a GType we can use COGL_TYPE_HANDLE instead.
This commit also removes the conditional compilation of the
:material property, as it makes little sense now that the
Materials API has landed.
COGL types should be registered inside the GType system, for
bindings and type checking inside properties and signals.
CoglHandle is a boxed type with a ref+unref semantics; slightly evil
from a bindings perspective (we cannot associate custom data to it),
but better than nothing.
The rest of the exposed types are enumerations or bitmasks.
The COGL_DEFINE_HANDLE macro generates a cogl_is_<type> function
as well, to check whether a CoglHandle opaque pointer is of type
<type>.
The handle for CoglMaterial does not export cogl_is_material() in
its installed header.
gtk-doc.make does not specify --tag=CC when invoking libtool, letting
it decide which tag to use. Something that fails with libtool 1.x and
when having CC set to funny things.
The rotation angle calculated in clutter_behaviour_rotate_alpha_notify
gets applied to each actor using clutter_behaviour_actors_foreach. The
angle is a ClutterFixed value. Before the cogl float branch merge it
was stuffed into a gpointer using GPOINTER_TO_UINT. The pointer was
then converted back to a uint and cast to a ClutterFixed which worked
out fine even for negative numbers.
After the cogl-float merge the angle is effectively a gfloat. This
gets cast to a uint and stored in a pointer and converted back to a
float via a uint at the other end. However this fails for negative
numbers because a uint -> float conversion can't take advantage of
overflow to preserve the sign so you end up with a large number.
It also had the side effect that it only rotated in whole degrees.
This commit fixes the problem by just passing the ClutterFixed value
inside a closure struct instead of trying to stuff it into a pointer.
From the homepage (http://dolt.freedesktop.org): Dolt provides a drop-in
replacement for libtool that significantly decreases compile times on
the platforms it supports.
Bug 1167 - clutter_effect_rotate improperly clamps negative angles
The rotation angle properties had a minimum value of 0.0 but the
rotation works fine with a negative value so the limitation is
unnecessary. This makes rotation using the ClutterAnimation API more
flexible because it was previously not possible to rotate
counter-clockwise from the 0.0 position.
When rendering a clone before this commit the clone's opacity was
combined with the opacity of the source but this is not usually the
desired effect. Instead the clone's opacity (combined with its
parents) should completely override the opacity of the source.
cogl_paint_init was a bit too miscellaneous; it mainly cleared the color, depth
and stencil buffers but arbitrarily it also disabled fogging and lighting.
It no longer disables lighting, since we know Cogl never enables lighting and
disabling of fog is now handled with a seperate function.
Since I noticed cogl_set_fog was taking a density argument documented as
"Ignored" I've also added a mode argument to cogl_set_fog which exposes the
exponential fog modes which can make use of the density.
Bug #1453 - Asynchronous texture loading can starve cpu.
Add a mutex that is held in the loader threads during the image
decoding. We were spawning and starting a thread for each asynchronously
loaded texture. This can cause cpu / memory starvation when many pixbuf
loaders allocate their temporary memory at the same time.
Also added -fno-strict-aliasing to MAINTAINER_CFLAGS in configure.ac
to avoid incorrect warnings caused by the static mutex code.
The clutter_get_current_event_time() function will return the event
timestamp coming from a Clutter event. Clutter might synthesize or
throttle events, so the function cannot be used when dealing with
backend-specific use cases.
The X11 backend is the only backend supported by Clutter that makes
use of timestamps, so it's altogether fitting that it should come
with a specific function to deal with the timestamps of the X events.
In generate_enter_leave_events it passes the device pointer from the
event to set_motion_last_actor but it was reading it directly from
event->motion.device. However the function is also used to process
button events so it would read from the wrong location in this case.
The device location in the union happened to be in the same place as
the click_count field of ClutterButtonEvent so it only mattered if the
click_count is non-zero. The X11 backend doesn't set this but
Clutter-GTK does so it was causing a crash.
Bug 1178 - No enter / leave events on actors when pointer leaves the
stage window
This patch causes the Win32 backend to emit CLUTTER_LEAVE events when
a WM_MOUSELEAVE event is received in the same way that f505536 does
for the X11 backend.
Windows will only send WM_MOUSELEAVE events if they are previously
requested using TrackMouseEvent so this needs to be called whenever
the mouse enters the window. There is no WM_MOUSELEAVE event but we
can detect when the mouse enters because we get a WM_MOUSEMOVE event.