gdouble alpha,
GdkRectangle page_area)
{
- gint width, height;
+ cairo_save (cr);
gdk_cairo_rectangle (cr, &page_area);
cairo_clip (cr);
-
- width = cairo_image_surface_get_width (surface);
- height = cairo_image_surface_get_height (surface);
-
- cairo_save (cr);
-
- if (width != page_area.width || height != page_area.height) {
- cairo_pattern_set_filter (cairo_get_source (cr), CAIRO_FILTER_FAST);
- cairo_scale (cr,
- (gdouble) page_area.width / width,
- (gdouble) page_area.height / height);
- }
-
cairo_surface_set_device_offset (surface, x_offset, y_offset);
cairo_set_source_surface (cr, surface, 0, 0);
g_return_if_fail (EV_IS_TRANSITION_ANIMATION (animation));
priv = EV_TRANSITION_ANIMATION_GET_PRIVATE (animation);
- g_object_get (priv->effect, "type", &type, NULL);
- progress = ev_timeline_get_progress (EV_TIMELINE (animation));
if (!priv->dest_surface) {
/* animation is still not ready, paint the origin surface */
return;
}
+ g_object_get (priv->effect, "type", &type, NULL);
+ progress = ev_timeline_get_progress (EV_TIMELINE (animation));
+
switch (type) {
case EV_TRANSITION_EFFECT_REPLACE:
/* just paint the destination slide */
priv = EV_TRANSITION_ANIMATION_GET_PRIVATE (animation);
+ if (priv->origin_surface == origin_surface)
+ return;
+
surface = cairo_surface_reference (origin_surface);
if (priv->origin_surface)
priv = EV_TRANSITION_ANIMATION_GET_PRIVATE (animation);
+ if (priv->dest_surface == dest_surface)
+ return;
+
surface = cairo_surface_reference (dest_surface);
if (priv->dest_surface)
priv = EV_TRANSITION_ANIMATION_GET_PRIVATE (animation);
- return (priv->origin_surface && priv->dest_surface);
+ return (priv->origin_surface != NULL);
}