mirror of
https://github.com/brl/mutter.git
synced 2025-02-19 22:54:08 +00:00
offscreen-effect: Use actor's opacity_override when redirecting painting
Override the actor's paint opacity so that it will appear fully opaque in the offscreen surface. This avoids multiple multiplications of an actor's opacity. Fixes http://bugzilla.clutter-project.org/show_bug.cgi?id=2541
This commit is contained in:
parent
b2ea7d1352
commit
442d8c3f2e
@ -251,6 +251,12 @@ clutter_offscreen_effect_pre_paint (ClutterEffect *effect)
|
|||||||
|
|
||||||
cogl_push_matrix ();
|
cogl_push_matrix ();
|
||||||
|
|
||||||
|
/* Override the actor's opacity to fully opaque - we paint the offscreen
|
||||||
|
* texture with the actor's paint opacity, so we need to do this to avoid
|
||||||
|
* multiplying the opacity twice.
|
||||||
|
*/
|
||||||
|
_clutter_actor_set_opacity_override (priv->actor, 0xff);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -307,6 +313,9 @@ clutter_offscreen_effect_post_paint (ClutterEffect *effect)
|
|||||||
cogl_matrix_translate (&modelview, priv->x_offset, priv->y_offset, 0.0f);
|
cogl_matrix_translate (&modelview, priv->x_offset, priv->y_offset, 0.0f);
|
||||||
cogl_set_modelview_matrix (&modelview);
|
cogl_set_modelview_matrix (&modelview);
|
||||||
|
|
||||||
|
/* Remove the opacity override */
|
||||||
|
_clutter_actor_set_opacity_override (priv->actor, -1);
|
||||||
|
|
||||||
/* paint the target material; this is virtualized for
|
/* paint the target material; this is virtualized for
|
||||||
* sub-classes that require special hand-holding
|
* sub-classes that require special hand-holding
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user