clutter-offscreen-effect: use target size when setting up the viewport

https://bugzilla.gnome.org/show_bug.cgi?id=650650
This commit is contained in:
Tomeu Vizoso 2011-05-20 11:15:07 +02:00
parent c18a83baa3
commit e59fff7a3f

View File

@ -273,14 +273,14 @@ clutter_offscreen_effect_pre_paint (ClutterEffect *effect)
xexpand = 0.f;
if (priv->x_offset < 0.f)
xexpand = -priv->x_offset;
if (priv->x_offset + fbo_width > width)
xexpand = MAX (xexpand, (priv->x_offset + fbo_width) - width);
if (priv->x_offset + priv->target_width > width)
xexpand = MAX (xexpand, (priv->x_offset + priv->target_width) - width);
yexpand = 0.f;
if (priv->y_offset < 0.f)
yexpand = -priv->y_offset;
if (priv->y_offset + fbo_height > height)
yexpand = MAX (yexpand, (priv->y_offset + fbo_height) - height);
if (priv->y_offset + priv->target_height > height)
yexpand = MAX (yexpand, (priv->y_offset + priv->target_height) - height);
/* Set the viewport */
cogl_set_viewport (-(priv->x_offset + xexpand), -(priv->y_offset + yexpand),