After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 682782 - Remove ClutterKnot
Remove ClutterKnot
Status: RESOLVED FIXED
Product: clutter
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: 2.0
Assigned To: clutter-maint
clutter-maint
Depends on:
Blocks: clutter-2-0
 
 
Reported: 2012-08-27 10:20 UTC by Emmanuele Bassi (:ebassi)
Modified: 2013-05-06 17:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch 0001 (20.04 KB, patch)
2013-04-08 19:54 UTC, Erick Perez Castellanos
reviewed Details | Review
Second patch. Removing ClutterKnot from ClutterPathNode (19.28 KB, patch)
2013-04-09 15:10 UTC, Erick Perez Castellanos
reviewed Details | Review
Final patch. Removed ClutterKnot (4.47 KB, patch)
2013-04-10 13:23 UTC, Erick Perez Castellanos
reviewed Details | Review
Migrating ClutterBezier (20.10 KB, patch)
2013-04-13 17:26 UTC, Erick Perez Castellanos
committed Details | Review
Migrating ClutterPathNode (16.63 KB, patch)
2013-04-13 17:27 UTC, Erick Perez Castellanos
committed Details | Review
Updated code example (1.44 KB, patch)
2013-04-13 17:28 UTC, Erick Perez Castellanos
committed Details | Review
Removing ClutterKnot (10.98 KB, patch)
2013-04-13 17:29 UTC, Erick Perez Castellanos
reviewed Details | Review
Remove ClutterKnot from clutter2-sections doc file (1.23 KB, patch)
2013-05-02 19:04 UTC, Erick Perez Castellanos
committed Details | Review
Remove ClutterKnot withuot the whitespace fixes (7.80 KB, patch)
2013-05-03 14:22 UTC, Erick Perez Castellanos
committed Details | Review
Whitespace and indentation fixes (8.32 KB, patch)
2013-05-03 15:19 UTC, Erick Perez Castellanos
rejected Details | Review

Description Emmanuele Bassi (:ebassi) 2012-08-27 10:20:23 UTC
the only API using ClutterKnot is ClutterPath; we have ClutterPoint, now, so:

  - ClutterPathNode should be moved to ClutterPoint
  - ClutterKnot should be removed from the base types
Comment 1 Emmanuele Bassi (:ebassi) 2013-03-26 12:21:44 UTC
also, we should drop the bezier computations done in fixed point math, and just use floating point: this allows us to increase range and precision, and avoid crappy results with long or scaled up paths.
Comment 2 Erick Perez Castellanos 2013-04-08 19:54:10 UTC
Created attachment 240979 [details] [review]
Patch 0001

I broke down the removal of ClutterKnot in three parts.

First: Migrating ClutterBezier to float.
Second: Migrating ClutterPathNone and ClutterPath to use ClutterPoint
and third: Remove ClutterKnot
Comment 3 Erick Perez Castellanos 2013-04-09 15:10:17 UTC
Created attachment 241067 [details] [review]
Second patch. Removing ClutterKnot from ClutterPathNode

This is the second stage. Removed ClutterKnot from almost every possible place.
Replaced ClutterKnot for ClutterPoint inside CluterPathNode. This is the biggest change. This caused all ClutterPath API migrated to using gfloat instead of gint.
Comment 4 Erick Perez Castellanos 2013-04-10 13:23:45 UTC
Created attachment 241150 [details] [review]
Final patch. Removed ClutterKnot

Final patch. Removed ClutterKnot
Comment 5 Emmanuele Bassi (:ebassi) 2013-04-13 08:16:48 UTC
Review of attachment 240979 [details] [review]:

it would probably be best if we added a bunch of unit tests to ClutterPath that verified that the curve behaves as intended, to catch regressions.

::: clutter/clutter-bezier.c
@@ +81,3 @@
+}
+
+/**

private functions should not use /** otherwise gtk-doc will pick them up and complain.

you can either use a simple /* or do something like /*< private >.

@@ +94,3 @@
 }
 
+/**

same as above.

@@ +107,3 @@
 }
 
+/**

same as above.

@@ +157,3 @@
 }
 
+/**

same as above.

@@ +199,3 @@
+  b->cy = 3 * y_2;
+  b->dx = x_3;
+  b->dy = y_3;

the initialization of the coefficients is different; the original code used the normalized values of the control points. have you tested ClutterPath with this commit?

@@ +222,3 @@
 }
 
+/**

the gtk-doc preamble should go away.

@@ +257,3 @@
 }
 
+/**

same as above.
Comment 6 Emmanuele Bassi (:ebassi) 2013-04-13 08:23:17 UTC
Review of attachment 241067 [details] [review]:

looks okay.

::: clutter/clutter-path.c
@@ +344,3 @@
 }
 
+/**

this is a static function, and should not have a gtk-doc preamble; you can use /* or /*< private > instead.

::: clutter/clutter-script-parser.c
@@ +326,2 @@
 gboolean
 _clutter_script_parse_knot (ClutterScript *script,

we already have _clutter_script_parse_point(); this code should just go away.
Comment 7 Emmanuele Bassi (:ebassi) 2013-04-13 08:24:46 UTC
Review of attachment 241150 [details] [review]:

::: doc/cookbook/examples/events-pointer-motion-scribbler.c
@@ +17,3 @@
                                          gpointer               data)
 {
+  ClutterPoint knot;

the events-pointer-motion-scribbler.c chunk should probably go into its own commit, before the commit the removes ClutterKnot from the code base.
Comment 8 Erick Perez Castellanos 2013-04-13 17:26:12 UTC
Created attachment 241458 [details] [review]
Migrating ClutterBezier

(In reply to comment #5)
> Review of attachment 240979 [details] [review]:
> 
> it would probably be best if we added a bunch of unit tests to ClutterPath that
> verified that the curve behaves as intended, to catch regressions.

Yes, indeed.

> @@ +199,3 @@
> +  b->cy = 3 * y_2;
> +  b->dx = x_3;
> +  b->dy = y_3;
> 
> the initialization of the coefficients is different; the original code used the
> normalized values of the control points. have you tested ClutterPath with this
> commit?

Yeap, I did. The thing is the original code used the other form of expressing the cubic bezier as form of two quadratic bezier. I'm using the polynomial form of it
Comment 9 Erick Perez Castellanos 2013-04-13 17:27:05 UTC
I fixed the patches. There for of them now.
Comment 10 Erick Perez Castellanos 2013-04-13 17:27:49 UTC
Created attachment 241459 [details] [review]
Migrating ClutterPathNode

Fixed doc strings
Comment 11 Erick Perez Castellanos 2013-04-13 17:28:25 UTC
Created attachment 241460 [details] [review]
Updated code example
Comment 12 Erick Perez Castellanos 2013-04-13 17:29:10 UTC
Created attachment 241461 [details] [review]
Removing ClutterKnot

Added fix to pass 'make check'
Comment 13 Erick Perez Castellanos 2013-05-02 19:04:51 UTC
Created attachment 243091 [details] [review]
Remove ClutterKnot from clutter2-sections doc file
Comment 14 Emmanuele Bassi (:ebassi) 2013-05-02 20:24:19 UTC
Review of attachment 241458 [details] [review]:

let's go with this.
Comment 15 Emmanuele Bassi (:ebassi) 2013-05-02 20:25:20 UTC
Review of attachment 241459 [details] [review]:

okay.
Comment 16 Emmanuele Bassi (:ebassi) 2013-05-02 20:25:35 UTC
Review of attachment 241460 [details] [review]:

okay.
Comment 17 Emmanuele Bassi (:ebassi) 2013-05-02 20:26:37 UTC
Review of attachment 241461 [details] [review]:

mmh, a bunch of whitespace fixes ended up in the patch. you may want to submit it as a separate patch.
Comment 18 Emmanuele Bassi (:ebassi) 2013-05-02 20:26:49 UTC
Review of attachment 243091 [details] [review]:

okay.
Comment 19 Erick Perez Castellanos 2013-05-03 14:22:59 UTC
Created attachment 243186 [details] [review]
Remove ClutterKnot withuot the whitespace fixes
Comment 20 Erick Perez Castellanos 2013-05-03 15:19:47 UTC
Created attachment 243199 [details] [review]
Whitespace and indentation fixes
Comment 21 Emmanuele Bassi (:ebassi) 2013-05-03 17:05:59 UTC
Review of attachment 243186 [details] [review]:

looks good.
Comment 22 Emmanuele Bassi (:ebassi) 2013-05-03 17:07:23 UTC
Review of attachment 243199 [details] [review]:

not a huge fan of this kind of commits: they tend to mess up git blame.
Comment 23 Emmanuele Bassi (:ebassi) 2013-05-06 17:18:37 UTC
everything's been pushed, so let's close this.