AM_LDFLAGS is ignored by the LDFLAGS target, and it's also not the right
place to put the libraries used by the linker.
Thanks to Vincent Untz for spotting this.
It might be desirable for some applications and/or platforms to get
every motion event that was delivered to Clutter from the windowing
backend. By adding a per-stage flag we can bypass the throttling
done when processing the events.
http://bugzilla.openedhand.com/show_bug.cgi?id=1665
Keep the CoglContext in sync between GL and GLES backends. We ought
to find a way to have a generic context, though, and have backend
specific sections.
Fixes bug:
http://bugzilla.openedhand.com/show_bug.cgi?id=1698
We need to explicitly force order so that ClutterJson.gir and Cogl.gir
are present in the parent directory before we try to build Clutter.typelib.
http://bugzilla.openedhand.com/show_bug.cgi?id=1700
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
On some platforms (anything but Linux, and on obscure Linux
architectures) dolt isn't used, so $(top_builddir)/doltlibtool
won't exist. $(top_builddir)/libtool will always be generated
even if dolt is used, so just use that unconditionally. We don't
need the extra speed when linking the single program for
introspection.
http://bugzilla.openedhand.com/show_bug.cgi?id=1699
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
A lot of applications change the size of the stage from the default
before the stage is initially shown. The size change won't take affect
until the first allocation run. However we want the window to be at
the correct size when we first map it so we should force an allocation
run before showing the stage.
There was an explicit call to XResizeWindow in
clutter_stage_x11_show. This is not needed anymore because
XResizeWindow will already have been called by the allocate method.
By default NSWindow does not listen to mousemoved events and hence the
default behaviour for Actors using the "motion-event" signal differs
from backend to backend.
Using setAcceptsMouseMovedEvents seems to fix it; unfortunately, I
cannot verify it, but since nobody is currently working on the Quartz
backend I guess it cannot get more broken than how currently is.
Thanks to: Michael <michael@f3k.org>
Fixes bug:
http://bugzilla.openedhand.com/show_bug.cgi?id=1687
It would be useful inside a custom actor's paint function to be able to
tell if this is a primary paint call, or if we are in fact painting on
behalf of a clone.
In Mutter we have an optimization not to paint occluded windows; this is
desirable for the windows per se, to conserve bandwith to the card, but
if something like an application switcher is using clones of these windows,
they will not get painted either; currently we have no way of
differentiating between the two.
Fixes bug:
http://bugzilla.openedhand.com/show_bug.cgi?id=1685
The CLUTTER_TEXTURE_IN_CLONE_PAINT was used with the old CloneTexture
actor; now that we have ClutterClone nothing sets the private flag
anymore, and the flag itself is not needed.
Updating the WM hints on the stage window shortcircuits if the stage
is in WITHDRAWN state, so we need to move the update_wm_hints() call
after the flag has been unset.
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
If we manually wait for the VBLANK with:
- SGI_video_sync
- Direct usage of the DRM ioctl
Then we should call glFinish() first, or otherwise the swap-buffers
may be delayed by pending drawing and cause a tear.
http://bugzilla.openedhand.com/show_bug.cgi?id=1636
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
The perspective test was used essentially to determine whether the
perspective set up in COGL worked correctly. The perspective code
has been changed a lot since Clutter 0.3: we rely on client-side
matrices and we use floating point; so, all the conditions the test
was supposed to verify do not exist anymore.
commit e2c4a2a9f8 fixed one thing but broke many others things :-/
hopfully this fixes that.
It turned out that the journal was mistakenly setting the OVERRIDE_LAYER0
flush option for all entries, but some other logic errors were also
uncovered in _cogl_material_equal.
Added an internal clutter function, _clutter_master_clock_ensure_next_iteration
that ensures another iteration of the master clock, can be called from repaint
functions as well as other threads.
To help us handle sliced textures; When flushing materials there is an
override option that can be given to replace the texture name for layer0
so we may iterate the slices without needing to modify the material
in use.
Since improving the journal's ability to batch state changes we added a
_cogl_material_equals function that is used by the journal to compare
materials and identify when a state change is required, but this wasn't
correctly considering the layer0 override resulting in false positives that
meant the journal wouldn't update the GL state and the first texture name
was used for all slices.
The cost of glGetFloatv with Mesa is still representing a majority of our
time in OpenGL for some applications, and the last thing left using this is
the current-matrix API when getting the projection matrix.
This adds a matrix stack for the projection matrix, so all getting, setting
and modification of the projection matrix is now managed by Cogl and it's only
when we come to draw that we flush changes to the matrix to OpenGL.
This also brings us closer to being able to drop internal use of the
deprecated OpenGL matrix functions, re: commit 54159f5a1d
The clutter_actor_get_allocation_coords() is not used, and since
the switch to floats in the Actor's API, it returns exactly what
the get_allocation_box() returns.
Currently, the transformation matrix for an actor is constructed
from scenegraph-related accessors. An actor, though, can call COGL
API to add new transformations inside the paint() implementation,
for instance:
static void
my_foo_paint (ClutterActor *a)
{
...
cogl_translate (-scroll_x, -scroll_y, 0);
...
}
Unfortunately these transformations will be completely ignored by
the scenegraph machinery; for instance, getting the actor-relative
coordinates from event coordinates is going to break badly because
of this.
In order to make the scenegraph aware of the potential of additional
transformations, we need a ::apply_transform() virtual function. This
vfunc will pass a CoglMatrix which can be used to apply additional
operations:
static void
my_foo_apply_transform (ClutterActor *a, CoglMatrix *m)
{
CLUTTER_ACTOR_CLASS (my_foo_parent_class)->apply_transform (a, m);
...
cogl_matrix_translate (m, -scroll_x, -scroll_y, 0);
...
}
The ::paint() implementation will be called with the actor already
using the newly applied transformation matrix, as expected:
static void
my_foo_paint (ClutterActor *a)
{
...
}
The ::apply_transform() implementations *must* chain up, so that the
various transformations of each class are preserved. The default
implementation inside ClutterActor applies all the transformations
defined by the scenegraph-related accessors.
Actors performing transformations inside the paint() function will
continue to work as previously.
Scanners like gtk-doc and g-ir-scanner get confused by:
typedef struct _Foo {
...
} Foo;
And expect instead:
typedef struct _Foo Foo;
struct _Foo {
...
};
CoglMatrix definition should be changed to avoid the former type.
The race we were experiencing in the X11 backends is apparently
back after the fix in commit 00a3c698.
This time, just delaying the setting of the SYNC_MATRICES flag
is not enough, so we can resume the use of a STAGE_IN_RESIZE
private flag.
This should also fix bug:
http://bugzilla.openedhand.com/show_bug.cgi?id=1668
In order to validate the sequence of:
XResizeWindow
ConfigureNotify
glViewport
that should happen on X11 we need to add debug annotations to the
calls to glViewport() done through COGL.