Commit Graph

5299 Commits

Author SHA1 Message Date
Emmanuele Bassi
b674fcf3bb build: Add missing cogl-shader-boilerplate.h 2010-11-20 10:47:22 +00:00
Emmanuele Bassi
be3040fd2b build: Add a missing file 2010-11-19 18:30:06 +00:00
Emmanuele Bassi
e30b7b2d5a build: Don't reference non-existing files 2010-11-19 18:15:49 +00:00
Emmanuele Bassi
60c6312b2d Update the NEWS file 2010-11-19 18:07:27 +00:00
Emmanuele Bassi
d39277d0cf actor: Reset the last paint box on unmap
This allows hiding + moving + showing an actor without repainting the
wrong area.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2395
2010-11-19 14:49:00 +00:00
Owen W. Taylor
346d3e40a3 Free state at the end of a journal flush
At the end of flushing the journal, we need to free the vertex
attributes and vertex array.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2423
2010-11-19 13:27:30 +00:00
Owen W. Taylor
1299672b5a Actually free buffer objects
With the refactoring to centralize code into CoglBuffer,
_cogl_buffer_fini() was never actually implemented, so all GL
vertex and index buffer objects were leaked.

The duplicate call to glDeleteBuffers() in CoglPixelArray is
removed (it wasn't paying attention to whether the buffer had been
allocated as a PBO or not.)

http://bugzilla.clutter-project.org/show_bug.cgi?id=2423
2010-11-19 13:27:30 +00:00
Robert Bragg
a5c30398df egl: Adds support for clipped redraws
This adds egl backend support for handling clipped redraws. This uses
the EGL_NOK_swap_region extension to enable the EGL backend to present a
subregion from the back buffer to the front so we don't always have to
redraw the entire stage for small updates.
2010-11-19 13:27:30 +00:00
Robert Bragg
a4d3208eb5 debug: Adds a COGL_DEBUG=wireframe option
This adds a COGL_DEBUG=wireframe option to visualize the underlying
geometry of the primitives being drawn via Cogl. This works for triangle
list, triangle fan, triangle strip and quad (internal only) primitives.
It also works for indexed vertex arrays.
2010-11-19 13:27:30 +00:00
Robert Bragg
78ac92f8e5 vertex-buffer: don't unref NULL object
In cogl_vertex_buffer_indices_get_for_quads() we sometimes have to
extend the length of an existing array, but when we came to unref the
previous array we didn't first check that it wasn't simply NULL.
2010-11-19 13:27:30 +00:00
Robert Bragg
f473c213fc vertex-array: Adds data arg for _vertex_array_new()
This adds an optional data argument for cogl_vertex_array_new() since it
seems that mostly every case where we use this API we follow up with a
cogl_buffer_set_data() matching the size of the new array. This
simplifies all those cases and whenever we want to delay uploading of
data then NULL can simply be passed.
2010-11-19 13:27:30 +00:00
Robert Bragg
804dd5d5fc indices: Makes cogl_indices_get_array public
This makes the previously internal only _cogl_indices_get_array API
public as cogl_indices_get_array (Though marked as experimental)
2010-11-19 13:27:30 +00:00
Robert Bragg
dfc671da59 build: cogl-clip-state.h depends on cogl-clip-stack.h
This adds a #include "cogl-clip-stack.h" to cogl-clip-state.h which
depends on the CoglClipStack typedef.
2010-11-19 13:27:30 +00:00
Robert Bragg
6f68bb3656 debug: disable-culling was disabling clipped redraws
there was a typo and the disable-culling option was actually disabling
clipped redraws.
2010-11-19 12:55:55 +00:00
Emmanuele Bassi
694632ce95 build: Re-arrange headers
Try to minimize the included headers, especially in clutter-actor.h.
2010-11-18 18:23:49 +00:00
Emmanuele Bassi
63cef64d17 docs: Fix some wrong function/signal/property names 2010-11-18 15:21:16 +00:00
Emmanuele Bassi
b0f5350379 test-layout: Port away from Behaviour
Use a simple animation with a looping+reversing timeline.
2010-11-18 15:21:16 +00:00
Emmanuele Bassi
eade1ab19e test-rotate: Remove the behaviour code
Use a looping animation with a shared timeline instead.
2010-11-18 15:21:16 +00:00
Emmanuele Bassi
74a770a976 docs: Add Behaviour migration guide 2010-11-18 15:21:16 +00:00
Emmanuele Bassi
a35708eb74 Deprecate ClutterBehaviour and sub-classes
The Behaviour class and its implementations have been replaced by the
new animation framework API and by the constraints for layout-related
animations.

Currently, we need to make tests build, so we undef DISABLE_DEPRECATED
in specific test cases while they get ported.
2010-11-18 15:21:16 +00:00
Emmanuele Bassi
71a838815f timeline: Add :reverse property
The :reverse property removes the pattern of connecting to the
::completed signal of a Timeline to change the direction.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2408
2010-11-18 15:18:19 +00:00
Emmanuele Bassi
1ce47bb562 docs: Remove unnecessary '#'
The hash is confusing gtk-doc.
2010-11-18 15:04:33 +00:00
Emmanuele Bassi
a94ea93bde paint-volume: Do not take a reference on the actor
The paint volume structure is cached in the Actor it references, and
this causes a reference cycle.

The paint volume is going to be used when painting, so the actor must
still be valid - otherwise Clutter will bail out far before than
accessing the actor pointer in ClutterPaintVolume.

Otherwise, we could have used dispose() to check for a valid actor and
remove a reference if the actor field is !NULL; it feels less clean,
though, since we're effectively managing an extra reference on
ourselves.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2431
2010-11-18 11:11:03 +00:00
Emmanuele Bassi
0371ba3976 actor: Group bitfields together 2010-11-18 11:10:59 +00:00
Emmanuele Bassi
b55346151c build: Cogl-2.0 API reference should be conditionally built
Building the API reference for Cogl 2.0 is fairly confusing: the API
itself is experimental and for internal use only -- though we want
feedback for it.

Let's build the API reference only when Clutter is configured with a
specific configure switch, so that people that wish to give feedback on
the API and its documentation can do it.
2010-11-17 19:15:17 +00:00
Emmanuele Bassi
8f60d5a3a2 Start using the monotonic API in GLib ≥ 2.27
Starting from the 2.27 cycle, GLib is exposing a monotonic clock with
microseconds granularity throughout the time-based API. We can start
using it, given that the old, non-monotonic version is going to be
deprecated by the same cycle.
2010-11-17 16:19:10 +00:00
Emmanuele Bassi
68d7a5e847 Move away from GTimeVal
GLib 2.28 will deprecate GTimeVal and related API in favour of
standardizing on microseconds granularity for all time-based API.

Clutter should switch too.

All of the current users of GTimeVal convert to milliseconds when
doing time operations, and use GTimeVal only as storage. This can
effectively be replaced by a gint64.

The Master Clock uses a microsecond resolution, except when interacting
with the main loop itself, since the main loop has a millisecond
resolution - at least until Ryan Lortie manages to switch that too to
microseconds on Linux.

The clutter_timeline_do_tick() function was erroneously not privatized,
but it was still assumed to be private; we should just remove it from
the public symbols.
2010-11-17 16:19:10 +00:00
Emmanuele Bassi
8b047d0bc9 docs: Move the constraints example picture about the source code 2010-11-17 12:49:10 +00:00
Emmanuele Bassi
e5da5b0907 shaders: Fix the usage of the Cogl GLSL variables 2010-11-17 12:47:46 +00:00
Emmanuele Bassi
f96113705d docs: Fix closing tag 2010-11-17 12:14:02 +00:00
Emmanuele Bassi
a731682ac3 actor: Simple show/hide optimizations
Showing a visible (and hiding an invisible) actor is far less cheap than
it should be.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2422
2010-11-17 08:32:55 +00:00
muflone
66e7a38a3d po: Update Italian translation
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
2010-11-17 08:32:55 +00:00
Emmanuele Bassi
a32f781144 docs: Break down the constraints example 2010-11-17 08:32:54 +00:00
Emmanuele Bassi
3777e0b382 docs: Update the constraints example image 2010-11-16 11:01:20 +00:00
Emmanuele Bassi
2950cb3e78 docs: Fix Since tags for PaintVolume-related API 2010-11-15 16:02:15 +00:00
Emmanuele Bassi
b7fa13a52f docs: Add introductory section on Constraints
Use the snap-constraint code for the example code and screenshot.
2010-11-15 16:00:49 +00:00
Emmanuele Bassi
3c15c0c9bb Add SnapConstraint
A SnapConstraint is a constraint that "snaps" the edges of two actors
together.
2010-11-15 16:00:49 +00:00
Emmanuele Bassi
b3f5a6e2ba actor: Do not queue relayouts on actors being destroyed
Simple optimization is simple.
2010-11-15 16:00:48 +00:00
Emmanuele Bassi
0523d6db08 actor: Add a get_debug_name() private Actor method
For internal usage, writing:

  clutter_actor_get_name (actor) != NULL
    ? clutter_actor_get_name (actor)
    : G_OBJECT_TYPE_NAME (actor)

is overly verbose and does two type checks. A simple, internal method
for getting the same result without type checks would be much more
appreciated.
2010-11-15 16:00:48 +00:00
Emmanuele Bassi
f3295a3f36 Merge remote branch 'elliot/cookbook-opacity-values-fix'
* elliot/cookbook-opacity-values-fix:
  cookbook: Fix opacity examples in recipe
  cookbook: Fix incorrect value for opacity
2010-11-15 15:41:46 +00:00
Emmanuele Bassi
9f2c31547c Merge remote branch 'elliot/cookbook-animations-looping'
* elliot/cookbook-animations-looping:
  cookbook: Recipe for "looping animations"
  cookbook: Clarify how signals are emitted during looped animation
  cookbook: First draft for looping animations recipe
  cookbook: Recipe skeleton for "looping animations"
  cookbook: Looping animation examples
2010-11-15 15:37:42 +00:00
Emmanuele Bassi
5f9df7e3a0 Fix compilation warning by using the correct type 2010-11-15 15:36:41 +00:00
Emmanuele Bassi
92e21ae936 Merge remote branch 'elliot/c90-fix' 2010-11-15 15:26:07 +00:00
Elliot Smith
8bdfa4ddee cookbook: Recipe for "looping animations"
Added a recipe giving examples of how to loop
animations for each part of the animation API (implicit,
animator, state).

The discussion covers looping a fixed number of times
and inverting a single implicit animation to create
a loop which goes back to its start on each iteration.
2010-11-15 11:23:04 +00:00
Elliot Smith
e205bd0fdc cookbook: Clarify how signals are emitted during looped animation
Added a comment to the example code about how timeline
emits "completed" during looped animation, while the
animation itself doesn't.
2010-11-15 11:23:04 +00:00
Elliot Smith
7eb248b1f0 cookbook: First draft for looping animations recipe
Includes video showing the looped animation and
basic section headings, plus outline of content and notes.
2010-11-15 11:23:04 +00:00
Elliot Smith
071029e373 cookbook: Recipe skeleton for "looping animations" 2010-11-15 11:23:04 +00:00
Elliot Smith
0d8c730558 cookbook: Looping animation examples
Added code examples for creating a looped animation with
each of the animation approaches (implicit, ClutterAnimation,
ClutterState).
2010-11-15 11:23:04 +00:00
Emmanuele Bassi
e80035331b Use the right string in the font settings debug blurb 2010-11-14 23:06:53 +00:00
Emmanuele Bassi
e6bc65b5c3 text: Do not segfault with NULL :font-name
Make sure that we have a fall back in place for the default font name
string, and use g_strcmp0 to protect ourselves from NULL strings.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2417
2010-11-14 23:06:48 +00:00