1
0
Fork 0
Commit graph

2681 commits

Author SHA1 Message Date
Robert Bragg
b5a35a0f0b [test-cogl-vertex-buffer] Use clutter_color_from_hls instead of hsl_to_rgb
There is no need for a custom hsl to rgb converter since Clutter implements
this logic; originally it wasn't quite as optimal, but that has now been
fixed.
2009-03-17 11:37:29 +00:00
Robert Bragg
bb93a98762 [clutter-color] Use a different hls->rgb algorithm + use floating point
Using test-cogl-vertex-buffer as a test case which is CPU bound due to
hls -> rgb conversions this alternative algorithm looked to be ~10%
faster when tested on an X61s Lenovo.
2009-03-17 11:37:29 +00:00
Emmanuele Bassi
567a96c96a [docs] More information on animation queueing
Queuing an animation on an actor cannot be done from within the
::completed signal handler, because we guarantee that the Animation
instance is valid and attached to the actor it animates for the
whole duration of the signal emission chain.

In order to queue animations you have to install an idle handler
on the main loop, and call clutter_actor_animate() inside it.

The documentation should be more clear about this caveat in the
memory management of ClutterAnimations created by the animate()
family of functions.
2009-03-16 18:20:58 +00:00
Emmanuele Bassi
9694107f90 Post-release bump to 0.9.3 2009-03-16 17:09:57 +00:00
Emmanuele Bassi
35191f09ef [release] Release 0.9.2 2009-03-16 16:58:13 +00:00
Emmanuele Bassi
f061e27416 Update release notes 2009-03-16 16:56:51 +00:00
Emmanuele Bassi
e7c5b15e60 [docs] Ignore the TimeoutInterval internal API
The TimeoutInterval API is internal, and thus should not be part
of the API reference.
2009-03-16 16:56:51 +00:00
Emmanuele Bassi
e8785fef07 [docs] Fix naming of the interval parameter
The interval parameter is now expressed in frames per second and not
in milliseconds.
2009-03-16 16:56:51 +00:00
Emmanuele Bassi
d5ee6fc264 Fix release date of 0.9.0 2009-03-16 16:34:17 +00:00
Robert Bragg
ca3bfe2cea [cogl] Don't endlessly print the same warning regarding layer fallbacks
There are various constraints for when we can support multi-texturing and
when they can't be met we try and print a clear warning explaining why the
operation isn't supported, but we shouldn't endlessly repeat the warning for
every primitive of every frame. This patch fixes that.
2009-03-16 16:19:51 +00:00
Robert Bragg
c5bd63648d [tests] Adds an interactive cogl vertex buffer unit test
The test is a sanity check that dynamic updating of vertex data via the cogl
vertex buffer api works and has reasonable performance. (though it can't be
considered a well designed benchmark since it wastes casual amounts of CPU
time simply choosing pretty colors.)

The code also aims to demonstrate one way of creating, updating and efficiently
drawing a quad mesh structure via the vertex buffer api which could be applied
to lots of different use cases.
2009-03-16 16:19:51 +00:00
Robert Bragg
71d65b629b [cogl-vertex-buffer] fix cogl_vertex_buffer_draw_elements prototype
This function was renamed a while ago in the .c file from
cogl_vertex_buffer_draw_range_elements  but the corresponding .h and
doc/reference/cogl changes weren't made.
2009-03-16 16:19:39 +00:00
Robert Bragg
14e6323554 [cogl-vertex-buffer] Allow querying back the number of vertices a buffer represents
This may be convenient e.g. at draw time if you are simply drawing all vertices
2009-03-16 16:17:02 +00:00
Robert Bragg
075ae9c4a7 [cogl-vertex-buffer] Add a flush of attribute changes in the *_draw() functions
For convenience it is now valid to avoid a seperate call to
cogl_vertex_buffer_submit() and assume that the _draw() calls will do this
for you (though of course if you do this you still need to ensure the
attribute pointers remain valid until your draw call.)
2009-03-16 16:14:17 +00:00
Neil Roberts
a93a93d007 Count timeline frames using the FPS instead of an integer interval
Bug 1495 - Timelines run 4% short

Previously the timelines were timed by calculating the interval
between each frame stored as an integer number of milliseconds so some
precision is lost. For example, requesting 60 frames per second gets
converted to 16 ms per frame which is actually 62.5 frames per
second. This makes the timeline shorter by 4%.

This patch merges the common code for timing from the timeout pools
and frame sources into an internal clutter-timeout-interval file. This
stores the interval directly as the FPS and counts the number of
frames that have been reached instead of the elapsed time.
2009-03-16 15:40:18 +00:00
Havoc Pennington
2c1c836417 [cogl] Flush matrix before clip planes
glClipPlane() is affected by modelview matrix so we need to flush
before calling it.

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
2009-03-16 15:10:33 +00:00
Emmanuele Bassi
9229fb6114 [docs] Bring down the undocumented symbols to 2%
The usual pre-release documentation blitzing. Most of the remaining
symbols are either COGL or X11 specific, or dummy interface typedefs.
2009-03-16 15:00:55 +00:00
Emmanuele Bassi
216373047b [animation] Enhance consistency of the Animation API
The Animation API should follow this pattern:

  - functions with an Interval as part of the arguments should have
    "interval" inside their name, e.g.:

      clutter_animation_bind_interval
      clutter_animation_update_interval

  - functions dealing with property names should have "property"
    inside their name, e.g.:

      clutter_animation_has_property
      clutter_animation_unbind_property

    - unless -

  - functions dealing with a property and its value should not
    have any modifier, e.g.:

      clutter_animation_bind

The change from update_property() to update_interval() frees up
clutter_animation_update(), to be added at a later date.
2009-03-16 14:16:18 +00:00
Emmanuele Bassi
bb795dec56 [docs] Update after Animation API changes
Rename the bind/unbind_property functions, and add the bind_interval,
completed method.

Also, add clutter_actor_get_animation().
2009-03-16 14:02:09 +00:00
Emmanuele Bassi
0942fac573 [docs] Add description of queue_redraw 2009-03-16 14:01:43 +00:00
Emmanuele Bassi
ff62040252 [tests] Remove unused variables
The size of the pixmap is passed by the ::size-changed signal, so
we can remove the unused w, h variables and avoid a compiler warning.
2009-03-16 12:17:03 +00:00
Havoc Pennington
961aac3fb3 [actor] Add ::queue-redraw signal
Bug 1454 - move queue_redraw virtualization to ClutterActor

The ClutterActor::queue-redraw signal allows parent containers to
track whether their children need a redraw.

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
2009-03-16 12:13:55 +00:00
Havoc Pennington
5706105123 [actor] Add :clip-to-allocation property
A common use of setting clip is to keep an actor inside its allocation;
right now to do this you have to set up a callback on notify::allocation.

There's no overhead added by sticking another bit in ClutterActor
clip-to-allocation that will clip painting to the allocation if set.

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
2009-03-16 12:13:55 +00:00
Colin Walters
0cb0a841cc [animation] Enhance the bind API
Bug 1419 - Add clutter_animation_bind, rename clutter_animation_bind_interval

This is a different approach from the clutter_actor_animatev
vector variant.  The single call should be even easier on
automatic bindings, since calls can be chained like:

  new Clutter.Animation({object: myactor}).bind("x", 42).bind("y", 43);

Note clutter_animation_bind_property which took a ClutterInterval
is renamed to clutter_animation_bind_interval for clarity, and to
discourage use since there are friendlier APIs about.

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
2009-03-16 12:13:55 +00:00
Emmanuele Bassi
156589fe3f [animation] Add Animation getter
If we are animating an actor using the clutter_actor_animate*() family
of functions we might want to expose a getter for the Animation instance
we are using, to avoid excessing bookkeeping.
2009-03-16 12:13:55 +00:00
Emmanuele Bassi
44d0733665 [animation] Add an emitter for ::completed
The ::completed signal requires an emitter in case we want to stop
the animation and safely dispose it inside application code without
breaking invariants.
2009-03-16 12:13:55 +00:00
Emmanuele Bassi
a5c88e62f2 [docs] Clarify Animation memory management
The memory management of the ClutterAnimation instances should be
heavily documented, given its "automagical" nature, so that other
people might understand it and avoid breaking it in the future.
2009-03-16 12:13:55 +00:00
Øyvind Kolås
0674fded7f Merge branch 'async-texture-thread-pool' 2009-03-16 00:40:27 +00:00
Øyvind Kolås
56568db3b0 [clutter-texture] fixed gtk-doc formatting, and init threads in test.
Fixed markup to actually work with gtk-doc, also do a g_thread_init
in the test.
2009-03-16 00:40:02 +00:00
Neil Roberts
7f2ef2f1e0 [cogl-path] Minor fix to gtk-doc
Fix the parameters in cogl_path_curve_to and cogl_path_rel_curve_to to
match the actual names otherwise they won't appear correctly in the
docs.
2009-03-13 15:43:19 +00:00
Emmanuele Bassi
89060a9bb3 [cogl] Avoid shadowing math.h symbols
As usual, y1 and y2 end up shadowing symbols exported by math.h.
2009-03-13 15:28:20 +00:00
Owen W. Taylor
e1742af368 Avoid drawing twice if relayout queues a draw
It's reasonably normal for a relayout of the stage to cause the stage
to be queued for drawing; for this reason we should do the relayout before
we clear stage->update_idle. (But want to clear update_idle() before actually
doing the redraw to handle the corner case where the draw queues another
redraw.)
2009-03-13 15:20:50 +00:00
Emmanuele Bassi
72f9646804 Do not cause more size requisitions than necessary
Bug 1499 - clutter_actor_notify_if_geometry_changed causes sync
           layout cycles

Whenever clutter_actor_set_{width,height,x,y,size...} is used, extra
synchronous size requests are triggered in
clutter_actor_notify_if_geometry_changed.

If the get_preferred_width() and get_preferred_height() implementations
are particularly costly (e.g. ClutterText) this will result in a performance
impact.

To avoid excessive allocation or requisition cycles we use the
cached values and flags. If we don't have an allocation, we assume
that we need to notify all the properties; if we don't have a size
requisition we notify only width and height; finally, if we do have
a valid allocation we notify only on the changed values.
2009-03-13 15:20:49 +00:00
Emmanuele Bassi
786161c75f [deprecated] Add Effect deprecation
The ClutterEffect API has been deprecated during 0.9, so it should be
added to the deprecation macros.
2009-03-13 14:29:27 +00:00
Emmanuele Bassi
ed2fe41b32 Add more deprecation notices
Most of the deprecated API does not have an entry inside
clutter-deprecated.h, thus making porting a tad more difficult.
2009-03-13 14:29:27 +00:00
Neil Roberts
cde05288b7 Change cogl_path_rectangle and cogl_path_round_rectangle to take x1,y1,x2,y2
This matches the changes to cogl_rectangle to improve consistency.
2009-03-13 12:20:26 +00:00
Neil Roberts
5d4c09369e [README] Small typo fix 2009-03-13 12:02:33 +00:00
Robert Bragg
2edccc760d Merge branch 'cogl-client-matrix-stacks'
* cogl-client-matrix-stacks:
  Maintain the Cogl assumption that the modelview matrix is normally current
  Finish GLES{1,2} support for client side matrix stacks
  Explicitly make the modelview-matrix current in cogl_{rotate,transform,etc}
  Avoid casting CoglMatrix to a GLfloat * when calling glGetFloatv
  Removes need for casting const float * in _cogl_set_clip_planes
  Virtualize GL matrix operations and use a client-side matrix when GL is indirect
2009-03-12 18:59:36 +00:00
Robert Bragg
ca2844013e Maintain the Cogl assumption that the modelview matrix is normally current
_cogl_add_path_to_stencil_buffer and _cogl_add_stencil_clip were leaving
the projection matrix current when calling cogl_rectangle which was
upsetting _cogl_current_matrix_state_flush.
2009-03-12 18:55:41 +00:00
Robert Bragg
0580dbe015 Finish GLES{1,2} support for client side matrix stacks
Adds glFrustum wrappers (GLES only accepts floats not doubles, and GLES2
needs to use our internal cogl_wrap_glFrustumf)

Adds GL_TEXTURE_MATRIX getter code in cogl_wrap_glGetFloatv

Adds a GL_TEXTURE_MATRIX define for GLES2
2009-03-12 18:55:41 +00:00
Robert Bragg
3a9b18ef51 Use Cogl enum when making modelview-matrix current in cogl_{rotate,transform,etc}
My previous patch incorrectly used the GL enum with the _cogl_set_current_matrix
API.
2009-03-12 18:55:40 +00:00
Robert Bragg
2f34d14cb4 Explicitly make the modelview-matrix current in cogl_{rotate,transform,etc}
Its not intended that users should use these with any other matrix mode, and
internally we now have the _cogl_current_matrix API if we need to play with
other modes.
2009-03-12 18:55:40 +00:00
Robert Bragg
0d88ecb459 Avoid casting CoglMatrix to a GLfloat * when calling glGetFloatv
If we later add internal flags to CoglMatrix then this code wouldn't
initialize those flags. The ways it's now done adds a redundant copy, but
if that turns out to be something worth optimizing we can look again at
using a cast but adding another way for initializing internal flags.
2009-03-12 18:55:40 +00:00
Robert Bragg
61b867442b 80 char fix 2009-03-12 18:55:40 +00:00
Robert Bragg
20a2f76e1f Removes need for casting (const float *) to (GLfloat *) in _cogl_set_clip_planes
This removes cogl.c:apply_matrix(), and makes cogl.c:project_vertex() use
cogl_matrix_transform_point instead.
2009-03-12 18:53:22 +00:00
Havoc Pennington
08932584b5 Virtualize GL matrix operations and use a client-side matrix when GL is indirect
This is useful because sometimes we need to get the current matrix, which
is too expensive when indirect rendering.

In addition, this virtualization makes it easier to clean up the API in
the future.
2009-03-12 18:32:45 +00:00
Øyvind Kolås
5895048f65 [clutter-texture] updated documentation.
Rewrote documentation, with the smallest amount of documentation for
load-data-async which is considered a special case of load-async.
2009-03-12 11:48:44 +00:00
Øyvind Kolås
25d54a650d Merge commit 'origin/async-texture-thread-pool' into async-size 2009-03-12 11:18:11 +00:00
Øyvind Kolås
93d8f62f6b [clutter-texture] remove load-size-async property
Only have load-data-async and load-async properties, both are construct
only and the latter adds the former load-size-async behavior on top of
load-data-async.
2009-03-12 10:38:39 +00:00
Øyvind Kolås
d3b68298ac [clutter-texture] add option to not block on size for loaded images
Added a construct time property to indicate that we do not want
to block on loading images.
2009-03-12 10:30:09 +00:00