Bug 1209 - Move fixed point API in COGL
* clutter/cogl/cogl-fixed.h:
* clutter/cogl/cogl.h.in:
* clutter/cogl/common/Makefile.am:
* clutter/cogl/common/cogl-fixed.c: Add fixed point API, modelled
after the ClutterFixed. The CoglFixed API supercedes the ClutterFixed
one and avoids the dependency of COGL on Clutter's own API.
* clutter/cogl/common/cogl-clip-stack.c:
* clutter/cogl/common/cogl-primitives.c:
* clutter/cogl/common/cogl-primitives.h: Update internal usage of
ClutterFixed to CoglFixed.
* clutter/cogl/gl/Makefile.am:
* clutter/cogl/gl/cogl-primitives.c:
* clutter/cogl/gl/cogl-texture.c:
* clutter/cogl/gl/cogl.c: Ditto, in the GL implementation of the
COGL API.
* clutter/cogl/gles/Makefile.am:
* clutter/cogl/gles/cogl-fbo.c:
* clutter/cogl/gles/cogl-gles2-wrapper.c:
* clutter/cogl/gles/cogl-primitives.c:
* clutter/cogl/gles/cogl-texture.c:
* clutter/cogl/gles/cogl.c: Ditto, in the GLES implementation of
the COGL API.
* clutter/pango/pangoclutter-glyph-cache.c:
* clutter/pango/pangoclutter-glyph-cache.h: Ditto, in the Pango
renderer glyphs cache.
* clutter/clutter-fixed.c:
* clutter/clutter-fixed.h: ClutterFixed and related API becomes
a simple transition API for bindings and public Clutter API.
* clutter/clutter-actor.c:
* clutter/clutter-alpha.c:
* clutter/clutter-backend.c:
* clutter/clutter-behaviour-depth.c:
* clutter/clutter-behaviour-ellipse.c:
* clutter/clutter-behaviour-path.c:
* clutter/clutter-behaviour-rotate.c:
* clutter/clutter-behaviour-scale.c:
* clutter/clutter-clone-texture.c:
* clutter/clutter-color.c:
* clutter/clutter-entry.c:
* clutter/clutter-stage.c:
* clutter/clutter-texture.c:
* clutter/clutter-timeline.c:
* clutter/clutter-units.h: Move from the internal usage of
ClutterFixed to CoglFixed.
* doc/reference/clutter/clutter-sections.txt:
* doc/reference/cogl/cogl-docs.sgml:
* doc/reference/cogl/cogl-sections.txt: Update the documentation.
* tests/test-cogl-tex-tile.c:
* tests/test-project.c: Fix tests after the API change
* README: Add release notes.
* clutter/cogl/gl/cogl.c:
* clutter/cogl/gles/cogl.c:
* clutter/cogl/cogl.h.in: Add cogl_clip_stack_save,
cogl_clip_stack_restore, cogl_viewport and cogl_frustum.
* clutter/cogl/gl/cogl-fbo.h:
* clutter/cogl/gl/cogl-fbo.c: Try to attach a stencil buffer when
creating an FBO.
* clutter/cogl/common/cogl-clip-stack.c: Add functions to save and
restore the whole state of the stack.
* clutter/clutter-texture.c (clutter_texture_paint): When
rendering the FBO source, setup a temporary asymmetric perspective
projection matrix to render it as it would appear on screen.
* clutter/clutter-private.h:
* clutter/clutter-actor.c
(_clutter_actor_apply_modelview_transform_recursive): No longer
static and exported in clutter-private.h
* clutter/clutter-rectangle.c:
* clutter/clutter-group.c:
* clutter/clutter-entry.c:
* clutter/clutter-clone-texture.c: Remove unnecessary calls to
cogl_{push,pop}_matrix. The matrix is preserved in
clutter_actor_paint whenever the actor's transformation is applied
so there should be no need to push the matrix in actor paint
implementations unless it does some additional transformations
itself.
new layout code
* clutter/clutter-texture.c (clutter_texture_new_from_actor): Now
parents the source actor if it doesn't already have a parent so
that it will get an allocation during layout.
* tests/test-fbo.c: One of the tests tries to ensure that the
ClutterTexture clone keeps the source actor alive by derefing
it. However as actors have a floating reference then test-fbo
doesn't have its own reference once the source is parented so
unrefing just steals the parent's reference and causes
badness. The test now claims the floating reference before cloning
the source so that it can safely be unref'd later.
Correct documentation about accepted pixel formats
* tests/test-stage-read-pixels.c: (main):
Don't try to free a ClutterTexture after main, fixes segfault on quit
Bug 989 - Add a search path for clutter script assets
* clutter/clutter-script.h:
* clutter/clutter-script.c:
(clutter_script_finalize),
(clutter_script_add_search_paths),
(clutter_script_lookup_filename): Add the ability to define multiple
search paths inside ClutterScript and to look up a specific filename
inside those search paths. This is useful to define a set of
directories where the assets for a UI definition are and still
reference those assets by their name instead of the full path. (989,
based on a patch by Matthew Allum)
* clutter/clutter-texture.c:
(clutter_texture_set_custom_property): Use the newly added
clutter_script_lookup_filename() function.
* clutter/clutter-texture.c:
(clutter_texture_get_preferred_width),
(clutter_texture_get_preferred_height),
(clutter_texture_set_property),
(clutter_texture_get_property),
(clutter_texture_class_init),
(clutter_texture_init): Add the new :keep-aspect-ratio property
to ClutterTexture; when set to TRUE the texture will return a
preferred width maintaining the aspect ratio with the given height
and a preferred height maintaining the aspect ratio with the
given width. This allows to set the width or the height and have
the texture automatically request the height or the width respectively
while maintaining the aspect ratio of the original image.
* tests/test-script.json: Update to test the new :keep-aspect-ratio
property.
* clutter/clutter-texture.c:
(clutter_texture_unrealize), (clutter_texture_dispose): Add a
guard against reading back memory during the unrealization on
dispose.
Bug #815 - Split up request, allocation, and paint box
* clutter/clutter-actor.[ch]: Rework the size allocation,
request and paint area. Now ::request_coords() is called
::allocate(), and ::query_coords() has been split into
::get_preferred_width() and ::get_preferred_height(). See
the documentation and the layout test on how to implement
a container and layout manager with the new API. (#915,
based on a patch by Havoc Pennington, Lucas Rocha and Johan
Bilien)
* clutter/clutter-clone-texture.c: Port CloneTexture to
the new size negotiation API; it just means forwarding
the requests to the parent texture.
* clutter/clutter-deprecated.h: Add deprecated and replaced
API.
* clutter/clutter-entry.c: Port Entry to the new size
negotiation API.
* clutter/clutter-group.c: Port Group to the new size
negotiation API; the semantics of the Group actor do not
change.
* clutter/clutter-label.c: Port Label to the new size
negotiation API, and vastly simplify the code.
* clutter/clutter-main.[ch]: Add API for executing a
relayout when needed.
* clutter/clutter-private.h: Add new Stage private API.
* clutter/clutter-rectangle.c: Update the get_abs_opacity()
call to get_paint_opacity().
* clutter/clutter-stage.c:
(clutter_stage_get_preferred_width),
(clutter_stage_get_preferred_height),
(clutter_stage_allocate),
(clutter_stage_class_init): Port Stage to the new size
negotiation API.
* clutter/clutter-texture.c: Port Texture to the new size
negotiation API.
* clutter/clutter-types.h: Add ClutterRequestMode enumeration.
* clutter/x11/clutter-stage-x11.c: Port the X11 stage
implementation to the new size negotiation API.
* tests/Makefile.am: Add the layout manager test case.
* tests/test-opacity.c: Update.
* tests/test-project.c: Update.
* tests/test-layout.c: Test case for a layout manager implemented
using the new size negotiation API; the layout manager handles
both transformed and untransformed children.
* clutter/clutter-texture.c:
Minor reformatting cleanups. Emit filter-quality prop on change.
* clutter/glx/clutter-glx-texture-pixmap.c:
Support mipmaps via filter quality prop.
control the use of mipmapping.
* clutter/clutter-texture.h: added ClutterTextureQuality enum.
* tests/test-texture-quality.c: new test.
* tests/Makefile.am: added test-texture-quality
* clutter/clutter-texture.c:
(clutter_texture_class_init): Do not unrealize on hide(), and
do not realize() on show. By default, clutter_actor_show() will
realize ourselves, and we don't want to unrealize when hidden
to avoid paying the penalty of reading back the texture data
from the video memory.
* tests/test-actors.c: Show all textures again when pressing
the 'r' key.
Bug #948 - Remove texture rectangle support
* clutter/clutter-feature.c:
* clutter/clutter-feature.h:
* clutter/clutter-texture.c:
* clutter/cogl/gl/cogl.c:
* clutter/glx/clutter-glx-texture-pixmap.c:
Remove support for GL_TEXTURE_RECTANGLE_ARB (now using just regular
2D textures, with optional npots extension). Simplifys code, + makes
mipmap & shader support much more sane.
* clutter/cogl/gl(es)/cogl-texture.h:
* clutter/cogl/gl(es)/cogl-texture.c:
cogl_texture_new_* functions take a gboolean auto_mipmap argument.
If TRUE automatic mipmap generation is enabled during the process
of slice texture object creation.
(cogl_texture_new_from_foreign:) now allows mipmap min filter
flags.
* clutter/clutter-texture.c:
* clutter/glx/clutter-glx-texture-pixmap.c:
* tests/test-cogl-offscreen.c:
* tests/test-cogl-tex-tile.c:
* tests/test-cogl-tex-convert.c:
* tests/test-cogl-tex-polygon.c:
* tests/test-cogl-tex-getset.c:
Pass FALSE for auto_mipmap to cogl_texture_new_*.
* clutter/pango/pangoclutter-render.c:
(tc_get:) Pass TRUE to cogl_texture_new_with_size and use mipmap
min filter for nicer glyphs at small scales. As a result test-text
has gone all beautiful now.
* clutter/clutter-actor.h:
* clutter/clutter-actor.c:
(clutter_actor_get_abs_opacity): Add function that does what
get_opacity() does now...
(clutter_actor_get_opacity): ... and make get_opacity() do what
it's supposed to be doing. The original get_opacity() returned
a composited value, and there's no way to actually extract the
real opacity value set with set_opacity().
* clutter/clutter-clone-texture.c:
* clutter/clutter-rectangle.c:
* clutter/clutter-texture.c: Update to use get_abs_opacity().
* clutter/clutter-entry.c:
* clutter/clutter-label.c: Ditto. Also, never change the stored
alpha value. (#804)
* tests/Makefile.am:
* tests/test-opacity.c: Test suite for the get_opacity() and
get_abs_opacity() API, and correct opacity handling.
* README: Add note about the change in get_opacity().
* clutter/clutter-texture.c (texture_update_data):
Fixed incorrect calculation of offset into texture data (needs to
use width of the texture, not of the updated area).
* clutter/clutter-texture.c:
Initial attempt at handling resizing/tranformed source textures.
* clutter/pango/pangoclutter-render.c: (draw_glyph):
Guards against freetype returning NULL bitmaps and
thus causing device by zeros on NVIDIA drivers. (see ml)
* clutter/clutter-actor.c: (clutter_actor_get_vertices):
Make sure GL related Matrices are initialised. Fixes#756
* clutter/clutter-texture.c:
Fix up code from Norways answer to Jean-Michel Basquiat.
(warning on tile_get_pixbuf)
renamed clutter_actor_apply_shader to be clutter_actor_set_shader.
Reindented/aligned header.
* clutter/clutter-texture.c: (clutter_texture_paint): temporarily
disable the shader on top of the clutter context's shader stack while
rendering into the FBO.
* tests/test-fbo.c: (main): s/apply_shader/set_shader/
* tests/test-shader.c: (button_release_cb), (main):
s/apply_shader/set_shader/
* clutter/clutter-shader.c:
Minor formatting cleanups to fit in 80 cols.
* clutter/clutter-texture.c:
More safety checks, clean ups in clutter_texture_new_from_actor()
* clutter/cogl/gl/cogl.c:
Always clear the FBO initially when rendering
* tests/test-fbo.c:
Overhall the test as to be more useful (and show current issues)
* clutter/clutter-feature.h:
* clutter/clutter-texture.c:
* clutter/clutter-texture.h:
* clutter/cogl/cogl.h:
* clutter/cogl/gl/cogl.c:
* clutter/cogl/gles/cogl.c:
* tests/Makefile.am:
* tests/test.fbo.c:
Add initial support for FBO's in Clutter (OpenGL only so far).
See new clutter_texture_new_from_actor()
Initial implementation, needs work.
* clutter/x11/clutter-stage-x11.c:
(clutter_stage_x11_set_cursor_visible):
Fall back to again not relying on xfixes to hide cursor. *sigh*
* clutter/clutter-deprecated.h:
Add clutter_group_find_child_by_id
* clutter/clutter-group.c:
Make sure unrealizing a group also unrealizes children.
* clutter/glx/clutter-stage-glx.c:
Chain up to group unrealize to make sure textures get unrealized
when changing context (see #718)
* clutter/clutter-texture.c:
Formatting cleanups