docs: Remove checks for whether an effect is disabled

pre_paint() and post_paint() implementations don't need
to check whether an effect is disabled: Clutter will
not apply an effect unless it is enabled.

So remove code which checks whether the effect is
enabled or disabled from the example applications and the
documentation.
This commit is contained in:
Elliot Smith 2011-03-17 15:45:57 +00:00
parent b5af8fbfac
commit 57a5f2296a
3 changed files with 1 additions and 20 deletions

View File

@ -385,8 +385,7 @@ cb_background_effect_dispose (GObject *gobject)
<para>Now, the important part: implement <function>pre_paint()</function> <para>Now, the important part: implement <function>pre_paint()</function>
and/or <function>post_paint()</function>, using Cogl to draw on the and/or <function>post_paint()</function>, using Cogl to draw on the
material(s) set up for the effect. In these functions, you should also material(s) set up for the effect.</para>
check whether the effect is enabled before drawing.</para>
<para>For the background effect, we implement <function>pre_paint()</function>, <para>For the background effect, we implement <function>pre_paint()</function>,
to draw a gray rectangle under the actor:</para> to draw a gray rectangle under the actor:</para>
@ -405,12 +404,6 @@ cb_background_effect_pre_paint (ClutterEffect *self)
gfloat height; gfloat height;
CbBackgroundEffectPrivate *priv; CbBackgroundEffectPrivate *priv;
ClutterActorMeta *meta = CLUTTER_ACTOR_META (self);
/* check that the effect is enabled before applying it */
if (!clutter_actor_meta_get_enabled (meta))
return TRUE;
priv = CB_BACKGROUND_EFFECT (self)->priv; priv = CB_BACKGROUND_EFFECT (self)->priv;
/* get the associated actor's dimensions */ /* get the associated actor's dimensions */

View File

@ -25,12 +25,6 @@ cb_background_effect_pre_paint (ClutterEffect *self)
gfloat height; gfloat height;
CbBackgroundEffectPrivate *priv; CbBackgroundEffectPrivate *priv;
ClutterActorMeta *meta = CLUTTER_ACTOR_META (self);
/* check that the effect is enabled before applying it */
if (!clutter_actor_meta_get_enabled (meta))
return TRUE;
priv = CB_BACKGROUND_EFFECT (self)->priv; priv = CB_BACKGROUND_EFFECT (self)->priv;
/* get the associated actor's dimensions */ /* get the associated actor's dimensions */

View File

@ -35,12 +35,6 @@ cb_border_effect_post_paint (ClutterEffect *self)
gfloat height; gfloat height;
CbBorderEffectPrivate *priv; CbBorderEffectPrivate *priv;
ClutterActorMeta *meta = CLUTTER_ACTOR_META (self);
/* check that the effect is enabled before applying it */
if (!clutter_actor_meta_get_enabled (meta))
return;
priv = CB_BORDER_EFFECT (self)->priv; priv = CB_BORDER_EFFECT (self)->priv;
/* get the associated actor's dimensions */ /* get the associated actor's dimensions */