mirror of
https://github.com/brl/mutter.git
synced 2024-11-23 00:20:42 -05: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 ();
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
@ -307,6 +313,9 @@ clutter_offscreen_effect_post_paint (ClutterEffect *effect)
|
||||
cogl_matrix_translate (&modelview, priv->x_offset, priv->y_offset, 0.0f);
|
||||
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
|
||||
* sub-classes that require special hand-holding
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user