Commit Graph

8397 Commits

Author SHA1 Message Date
Emmanuele Bassi
0f0ed31a5a gitignore: Add test-driver
New script, courtesy of autotools 1.13.
2013-05-15 21:19:51 +01:00
Emmanuele Bassi
755f41f559 canvas: Remove invalidate_with_size()
We can replace it by adding a return value to set_size() that can tell
us if the set_size() invalidated the contents of the canvas or not.
2013-05-15 20:08:02 +01:00
Emmanuele Bassi
323ec19dcc build: Remove INCLUDES directives
They have been deprecated for a while, replaced by AM_CPPFLAGS.
2013-05-15 15:18:13 +01:00
Emmanuele Bassi
c9583792cb build: Fix up the silent rules prefixes
Automake increased the whitespace, so we need to do that for our "I
Can't Believe It's Not Autotool™" rules.
2013-05-15 15:07:15 +01:00
Lionel Landwerlin
d1041e1f4f conform: add offscreen effects fbo size check
https://bugzilla.gnome.org/show_bug.cgi?id=699675
2013-05-15 14:58:46 +01:00
Lionel Landwerlin
9c6f3793e8 offscreen-effect: limit offscreen fbo size to the stage's size
When using a ClutterOffscreenEffect, the size of the offscreen buffer
allocated to perform the effect is currently computed using the paint
volume of the actor it's attached to and in the case the paint volume
cannot be computed, the effect falls back to using the stage's size.

If you scale an actor enough so its paint volume is much bigger that
the size of the stage, you can end up running out of memory (which
leads to your application crashing).

https://bugzilla.gnome.org/show_bug.cgi?id=699675
2013-05-15 14:58:45 +01:00
Chris Cummins
8a6aae14c8 docs: Add clutter-wayland section to reference docs
Gives this stray section a home in the reference documentation.
2013-05-14 12:42:08 +01:00
Chris Cummins
242f611863 clutter-input-device-wayland: Update indentifier name
Fixes a discrepancy between the function name and the gtk-doc identifier
introduced in 8f4e39b6 when the Wayland input protocol changed.
2013-05-14 12:42:08 +01:00
Chris Cummins
3de7e49432 docs: Remove empty line before parameter tags
The gtk-doc parser has somewhat esoteric rules regarding blank lines and
paragraph breaks, causing these parameter descriptions to be missed. See:

https://developer.gnome.org/gtk-doc-manual/stable/documenting_syntax.html.en
2013-05-14 12:42:08 +01:00
Chris Cummins
a075c286f2 clutter-stage-wayland: Pedantic typo fix
Je ne parle pas français
2013-05-14 12:42:08 +01:00
Chris Cummins
15bed2d9bd wayland: Add API version annotations
Version numbers have been derived from source code comment blocks.
2013-05-14 12:42:08 +01:00
Daniel Mustieles
f86cbdb14f Updated Spanish translation 2013-05-13 13:44:48 +02:00
Bastian Winkler
cd9ba0ad8d flow-layout: Add :snap-to-grid property
Add a :snap-to-grid property to FlowLayout to prevent the layout from
assigning it's children a position based on the size of the largest
child.

https://bugzilla.gnome.org/show_bug.cgi?id=648873
2013-05-11 10:54:38 -04:00
Emmanuele Bassi
fd9109e6d6 Fix up "allow-none" annotation 2013-05-06 10:20:36 -07:00
Emmanuele Bassi
bc664cc240 docs: Mention implicit animations checks in the release notes
Don't want anybody to be taken by surprise by this.
2013-05-06 10:04:23 -07:00
Emmanuele Bassi
9424e995fa actor: Improve conditions for skipping implicit transitions
The "should this implicit transition be skipped" check should live into
its own function, where we can actually explain what it does and which
conditions should be respected.

Instead of just blindly skipping actors that are unmapped, or haven't
been painted yet, we should add a couple of escape hatches.

First of all, we don't want :allocation to be implicitly animated until
we have been painted (thus allocated) once; this avoids actors "flying
in" into their allocation.

We also want to allow implicit transitions on the opacity even if we
haven't been painted yet; the internal optimization that we employ in
clutter_actor_paint() and skips painting fully transparent actors is
exactly that: an internal optimization. Caller code should not be aware
of this change, and it should not influence code outside of ClutterActor
itself.

The rest of the conditions are the same: if the easing state's duration
is zero, or if the actor is both unmapped and not in a cloned branch of
the scene graph, then implicit transitions are pointless, as they won't
be painted.

https://bugzilla.gnome.org/show_bug.cgi?id=698766
2013-05-06 10:04:22 -07:00
Emmanuele Bassi
f92b78781d stage: Use precomputed constants instead of trigonometric functions
This should actually ensure that the calculations of the Z translation
for the projection matrix is resolved to "variable * CONSTANT". The
original factors are left in code so it's trivial to revert to the
trigonometric operations if need be, even without reverting this commit.
2013-05-06 10:04:22 -07:00
Emmanuele Bassi
d061a47573 stage: Add a paint callback
The ClutterActor::paint signal is deprecated, and connecting to it even
to get notifications will disable clipped redraws because of violations
of the paint volume.

The only actual valid use case for notifications of a successful frame
is on the ClutterStage, so we should add new (experimental) API for it,
so that users can actually subscribe to it — at least if you're writing
a compositor.

Shoving a signal in a performance critical path is not an option, and
I'm not sure I want to commit to an API like this yet. I reserve the
right to revisit this decision in the future.

https://bugzilla.gnome.org/show_bug.cgi?id=698783
2013-05-06 10:04:21 -07:00
Emmanuele Bassi
264c67c2aa canvas: Allow invalidating the content along with the size
Currently, clutter_canvas_set_size() causes invalidation of the canvas
contents only if the newly set size is different. There are cases when
we want to invalidate the content regardless of the size set, but we
cannot do that right now without possibly causing two invalidations,
for instance:

  clutter_canvas_set_size (canvas, new_width, new_height);
  clutter_content_invalidate (canvas);

will cause two invalidations if the newly set size is different than
the existing one. One way to work around it is to check the current
size of the canvas and either call set_size() or invalidate() depending
on whether the size differs or not, respectively:

  g_object_get (canvas, "width", &width, "height", &height, NULL);
  if (width != new_width || height != new_height)
    clutter_canvas_set_size (canvas, new_width, new_height);
  else
    clutter_content_invalidate (canvas);

this, howevere, implies knowledge of the internals of ClutterCanvas,
and of its optimizations — and encodes a certain behaviour in third
party code, which makes changes further down the line harder.

We could remove the optimization, and just issue an invalidation
regardless of the surface size, but it's not something I'd be happy to
do. Instead, we can add a new function specifically for ClutterCanvas
that causes a forced invalidation regardless of the size change. If we
ever decide to remove the optimization further down the road, we can
simply deprecate the function, and make it an alias of invalidate()
or set_size().
2013-05-06 10:03:54 -07:00
Matej Urbančič
dc5284681c Updated Slovenian translation 2013-05-02 00:10:56 +02:00
Dimitris Spingos
a25e801ce9 Updated Greek translation 2013-04-27 06:16:24 +03:00
Marek Černocký
51cc17fb2b Updated Czech translation 2013-04-27 01:37:40 +02:00
Daniel Mustieles
0d8304087b Updated Spanish translation 2013-04-25 12:36:45 +02:00
Lionel Landwerlin
f66108e43a zoom-action: improve zooming behavior
https://bugzilla.gnome.org/show_bug.cgi?id=698674
2013-04-23 17:36:47 +01:00
Lionel Landwerlin
5a7a6ebfc4 gesture-action: refactor event handling function
https://bugzilla.gnome.org/show_bug.cgi?id=698671
2013-04-23 17:36:47 +01:00
Lionel Landwerlin
321553b139 gesture-action: fix trigger edge after behavior with more than 1 point
https://bugzilla.gnome.org/show_bug.cgi?id=698669
2013-04-23 17:36:47 +01:00
Lionel Landwerlin
fda406b4a8 gesture-action: add n-touch-points property
https://bugzilla.gnome.org/show_bug.cgi?id=698668
2013-04-23 17:36:47 +01:00
Lionel Landwerlin
82e5634117 gesture-action: avoid shadowing time() syscall function
https://bugzilla.gnome.org/show_bug.cgi?id=698668
2013-04-23 17:28:41 +01:00
Lionel Landwerlin
d691761985 gesture-action: fix typo
https://bugzilla.gnome.org/show_bug.cgi?id=698668
2013-04-23 17:28:34 +01:00
Emmanuele Bassi
0538adc58c timeline: Ensure the range on the cubic bezier control points
The X coordinate has to be in the [ 0.0, 1.0 ] range.
2013-04-05 15:35:15 +01:00
Emmanuele Bassi
8c32637eea Deprecate ClutterGeometry
It's a bad rectangle type, with caveats and gotchas. We have better
types, courtesy of Cairo, as well as our own (ClutterRect).

https://bugzilla.gnome.org/show_bug.cgi?id=682789
2013-04-04 11:53:39 +01:00
Emmanuele Bassi
1724536cda text: Add ::cursor-changed signal
Since we are trying to eliminate the ClutterGeometry type, we should
replace the only entry point still using it: the ::cursor-event signal
of ClutterText.

Instead of passing the cursor geometry, we should add an accessor
function.

The combination of signal and getter for the cursor geometry means that
we can deprecate ClutterText::cursor-event, and mark it for removal in
Clutter 2.0.

https://bugzilla.gnome.org/show_bug.cgi?id=682789
2013-04-04 11:53:39 +01:00
Emmanuele Bassi
03296e30e7 Fix compilers warnings when debugging is disabled 2013-04-04 11:53:38 +01:00
Emmanuele Bassi
75702fde4d Bump the requirement for Cogl to its stable release 2013-04-04 11:53:38 +01:00
Emanuele Aina
56844a2b75 tap-action: Fix the docs, it does not require actors with children 2013-04-01 19:10:36 +02:00
Neil Roberts
d5896d284e wayland: Queue a redraw after showing the stage
On the other backends we will get some sort of expose event after
showing the stage's window which will queue a redraw. These expose
events don't exist on Wayland so nothing will cause Clutter to queue a
redraw. Weston doesn't bother displaying anything for the stage's
surface until the first buffer is sent, which of course it will never
receive if Clutter doesn't paint anything. This patch just makes it
explicitly queue a redraw after the stage is shown so that we will
always pass at least one frame to the compositor.

The bug can be seen by running test-stage-sizing. That example doesn't
have any animations so it won't try to queue any redraws until
something interacts with it. On the other hand something like
test-actors works fine without the patch because it constantly queues
redraws anyway in order to display the animation.

https://bugzilla.gnome.org/show_bug.cgi?id=696791
2013-03-28 16:12:34 +00:00
Emmanuele Bassi
23707ac242 Add version-related macros for 1.16 2013-03-20 17:23:02 -03:00
Lionel Landwerlin
b914ae70b1 actor: fix translation-z setting
https://bugzilla.gnome.org/show_bug.cgi?id=695982
2013-03-18 10:39:08 +00:00
Ask H. Larsen
6203be641f Updated Danish translation 2013-03-17 14:58:17 +01:00
Duarte Loreto
d66691693c Updated Portuguese translation and converted to New Spelling (Novo AO) 2013-03-15 14:34:38 +00:00
Bastien Nocera
bbb54f1aed clutter: Prefer the X11 backend to the Wayland one
If clutter is built with both X11 and Wayland support, prefer the
(more complete for now) X11 backend. This matches GTK+'s current
ordering.

This allows distributions to ship a clutter version with both backends
built, and using an envvar to switch to the wayland backend and test
applications.

In the future, applications would be able to choose which backend
they prefer and in which order.

https://bugzilla.gnome.org/show_bug.cgi?id=695838
2013-03-14 15:29:00 +01:00
Emmanuele Bassi
73dbd17948 symbols: Add missing symbol 2013-03-13 16:00:36 -03:00
Emmanuele Bassi
59bd044859 docs: Add missing symbol to the list 2013-03-13 15:46:16 -03:00
Emmanuele Bassi
8f032d5952 actor: Skip transitions on invisible actors
If an actor has not been painted yet, or it's not going to be painted,
we can ignore transitions queued on it.

By ignoring transitions on actors that have not been painted yet, we can
avoid doing work during the set up phase of the scene graph, as well as
avoiding actors "flying in" from nowhere.

Obviously, we have to take into account potential clones, so we need to
check that the actor is not part of a cloned branch of the scene graph,
as well as checking if the actor has mapped clones.
2013-03-13 15:05:28 -03:00
Emmanuele Bassi
20c0985869 actor: Propagate the cloned state to the children
If we clone a container, we still want redraws queued on the children to
be propagated.
2013-03-13 15:05:28 -03:00
Emmanuele Bassi
0e0db890e1 actor: Ignore redraws queued on unmapped actors
If an actor is unmapped then it won't be painted, so we can safely
short-circuit out of _clutter_actor_queue_redraw_full() if the mapped
flag is not set.

We need, on the other hand, make an exception for Clones, otherwise
they won't receive notification that the source actor has changed
and they won't be painted.

This allows us to ignore redraws queued on children of invisible
parents, and avoid traversing the scene graph.
2013-03-13 15:05:28 -03:00
Emmanuele Bassi
028baa99a0 actor: Keep track of clones
Instead of using signal notifications, we should be able to keep track
of the clones of an actor from within ClutterActor itself, using private
API. There's no point in pretending that people can actually create a
Clone class out of tree, given the amount of invariants we have to punch
through in order to implement a proper replicator node of the scene
graph, so we can just skip the signal emissions and just do the right
thing at the right time.
2013-03-13 15:05:28 -03:00
Emmanuele Bassi
c32973158d actor: Clean up internal add/remove functions
More comments are warranted: these functions are pretty much full of
potential side effects, and I'd really like to avoid keeping everything
in my head forever.

Along with the comments and the type casting reduction, I sneaked in a
one line change that is clearly correct after reading the flow of the
whole thing: we queue only a relayout after three potential redraws have
been queued. If we manage to miss a redraw and yet still get a relayout
then it means that most of our assumptions are fundamentally wrong, and
that we ought to dump this whole business of computer programming, and
just go back to being a hunter-gatherer species.
2013-03-13 15:05:28 -03:00
Emmanuele Bassi
900015a4eb actor: Clean up ::show and ::hide class handlers
The main body of the function should not live inside an 'if' block.
2013-03-13 15:05:27 -03:00
Emmanuele Bassi
c11c875762 examples/layout-manager: Remove unnecessary easing state save
The actors in the layout are already set up with a non-default easing
state, we can use that.
2013-03-13 15:05:27 -03:00