2008-10-30 Emmanuele Bassi <ebassi@linux.intel.com>
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.
This commit is contained in:
@@ -98,9 +98,9 @@ test_coglbox_paint(ClutterActor *self)
|
||||
cos_frame = clutter_cosi (CLUTTER_ANGLE_FROM_DEG (priv->frame));
|
||||
|
||||
pingpong_frame = (priv->frame <= 180 ? priv->frame : 360 - priv->frame);
|
||||
frac_frame = CFX_QDIV (CLUTTER_INT_TO_FIXED (pingpong_frame),
|
||||
CLUTTER_INT_TO_FIXED (180));
|
||||
frac_frame += (CFX_ONE >> 1);
|
||||
frac_frame = COGL_FIXED_DIV (CLUTTER_INT_TO_FIXED (pingpong_frame),
|
||||
CLUTTER_INT_TO_FIXED (180));
|
||||
frac_frame += (COGL_FIXED_1 >> 1);
|
||||
frac_frame <<= 1;
|
||||
|
||||
for (t=0; t<4; t+=2)
|
||||
@@ -108,8 +108,8 @@ test_coglbox_paint(ClutterActor *self)
|
||||
texcoords[t] += cos_frame;
|
||||
texcoords[t+1] += sin_frame;
|
||||
|
||||
texcoords[t] = CFX_QMUL (texcoords[t], frac_frame);
|
||||
texcoords[t+1] = CFX_QMUL (texcoords[t+1], frac_frame);
|
||||
texcoords[t] = COGL_FIXED_MUL (texcoords[t], frac_frame);
|
||||
texcoords[t+1] = COGL_FIXED_MUL (texcoords[t+1], frac_frame);
|
||||
}
|
||||
|
||||
priv = TEST_COGLBOX_GET_PRIVATE (self);
|
||||
|
@@ -21,9 +21,9 @@ init_handles ()
|
||||
clutter_group_add (CLUTTER_GROUP (main_stage), p[i]);
|
||||
|
||||
clutter_actor_set_position (p[i],
|
||||
CLUTTER_FIXED_INT (v[i].x) -
|
||||
CLUTTER_FIXED_TO_INT (v[i].x) -
|
||||
clutter_actor_get_width (p[i])/2,
|
||||
CLUTTER_FIXED_INT (v[i].y) -
|
||||
CLUTTER_FIXED_TO_INT (v[i].y) -
|
||||
clutter_actor_get_height (p[i])/2);
|
||||
|
||||
clutter_actor_raise_top (p[i]);
|
||||
@@ -41,9 +41,9 @@ init_handles ()
|
||||
clutter_actor_set_position (p[4], 0, 0);
|
||||
clutter_group_add (CLUTTER_GROUP (main_stage), p[4]);
|
||||
clutter_actor_set_position (p[4],
|
||||
CLUTTER_FIXED_INT (v2.x) -
|
||||
CLUTTER_FIXED_TO_INT (v2.x) -
|
||||
clutter_actor_get_width (p[4])/2,
|
||||
CLUTTER_FIXED_INT (v2.y) -
|
||||
CLUTTER_FIXED_TO_INT (v2.y) -
|
||||
clutter_actor_get_height (p[4])/2);
|
||||
|
||||
clutter_actor_raise_top (p[4]);
|
||||
@@ -62,9 +62,9 @@ place_handles ()
|
||||
for (i = 0; i < 4; ++i)
|
||||
{
|
||||
clutter_actor_set_position (p[i],
|
||||
CLUTTER_FIXED_INT (v[i].x) -
|
||||
CLUTTER_FIXED_TO_INT (v[i].x) -
|
||||
clutter_actor_get_width (p[i])/2,
|
||||
CLUTTER_FIXED_INT (v[i].y) -
|
||||
CLUTTER_FIXED_TO_INT (v[i].y) -
|
||||
clutter_actor_get_height (p[i])/2);
|
||||
}
|
||||
|
||||
@@ -74,9 +74,9 @@ place_handles ()
|
||||
|
||||
clutter_actor_apply_transform_to_point (rect, &v1, &v2);
|
||||
clutter_actor_set_position (p[4],
|
||||
CLUTTER_FIXED_INT (v2.x) -
|
||||
CLUTTER_FIXED_TO_INT (v2.x) -
|
||||
clutter_actor_get_width (p[4])/2,
|
||||
CLUTTER_FIXED_INT (v2.y) -
|
||||
CLUTTER_FIXED_TO_INT (v2.y) -
|
||||
clutter_actor_get_height (p[4])/2);
|
||||
}
|
||||
|
||||
@@ -148,8 +148,8 @@ on_event (ClutterStage *stage,
|
||||
CLUTTER_FIXED_TO_FLOAT (yp));
|
||||
|
||||
clutter_actor_move_by (rect,
|
||||
CLUTTER_FIXED_INT(xp),
|
||||
CLUTTER_FIXED_INT(yp));
|
||||
CLUTTER_FIXED_TO_INT(xp),
|
||||
CLUTTER_FIXED_TO_INT(yp));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user