From: Emmanuele Bassi Date: Thu, 10 Jun 2010 16:34:48 +0000 (+0100) Subject: docs: Fix Effect subclassing section X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8d22fea31c1df87904a82112ef3e917b70d56120;p=profile%2Fivi%2Fclutter.git docs: Fix Effect subclassing section It still mentions the long since removed "prepare" function. --- diff --git a/clutter/clutter-effect.c b/clutter/clutter-effect.c index 0dd781b..c89f332 100644 --- a/clutter/clutter-effect.c +++ b/clutter/clutter-effect.c @@ -39,29 +39,17 @@ * * Implementing a ClutterEffect * Creating a sub-class of #ClutterEffect requires the implementation - * of three virtual functions: + * of two virtual functions: * - * prepare(), which is called when - * attaching the #ClutterEffect to a #ClutterActor through the - * clutter_actor_add_effect() function or when the actor is being - * painted; * pre_paint(), which is called * before painting the #ClutterActor. * post_paint(), which is called * after painting the #ClutterActor. * - * The prepare() function receives the - * #ClutterActor to which the effect has been attached to, and it should be - * used to set up the initial state of the effect, for instance depending on - * the actor that has been passed. The function returns a boolean value, - * which is used to determine whether the #ClutterEffect has been prepared or - * not. An unprepared shader will be asked to prepare itself again during the - * actor's paint sequence, and if it fails again it will be ignored. * The pre_paint() function should be used to set * up the #ClutterEffect right before the #ClutterActor's paint - * sequence. This function, like prepare() can fail, and - * return %FALSE; in that case, no post_paint() - * invocation will follow. + * sequence. This function can fail, and return %FALSE; in that case, no + * post_paint() invocation will follow. * The post_paint() function is called after the * #ClutterActor's paint sequence. * The pre_paint() phase could be seen as a custom @@ -73,8 +61,8 @@ * A simple ClutterEffect implementation * The example below creates two rectangles: one will be painted * "behind" the actor, while another will be painted "on top" of the actor. - * The prepare() phase will create the two materials - * used for the two different rectangles; the + * The set_actor() implementation will create the two + * materials used for the two different rectangles; the * pre_paint() function will paint the first material * using cogl_rectangle(), while the post_paint() * phase will paint the second material.