evince r3562 - in trunk: . libview
- From: nshmyrev svn gnome org
- To: svn-commits-list gnome org
- Subject: evince r3562 - in trunk: . libview
- Date: Mon, 30 Mar 2009 01:49:12 +0000 (UTC)
Author: nshmyrev
Date: Mon Mar 30 01:49:12 2009
New Revision: 3562
URL: http://svn.gnome.org/viewvc/evince?rev=3562&view=rev
Log:
2009-03-30 Nickolay V. Shmyrev <nshmyrev yandex ru>
* libview/ev-transition-animation.c:
(ev_transition_animation_paint), (ev_transition_animation_ready):
Animation is ready only when origin surface is ready. This fixes
fading animations because otherwise next page is displayed
before animaiton starts.
Modified:
trunk/ChangeLog
trunk/libview/ev-transition-animation.c
trunk/libview/ev-view.c
Modified: trunk/libview/ev-transition-animation.c
==============================================================================
--- trunk/libview/ev-transition-animation.c (original)
+++ trunk/libview/ev-transition-animation.c Mon Mar 30 01:49:12 2009
@@ -556,8 +556,6 @@
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 */
@@ -565,6 +563,9 @@
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 */
@@ -678,5 +679,5 @@
priv = EV_TRANSITION_ANIMATION_GET_PRIVATE (animation);
- return (priv->origin_surface && priv->dest_surface);
+ return (priv->origin_surface != NULL);
}
Modified: trunk/libview/ev-view.c
==============================================================================
--- trunk/libview/ev-view.c (original)
+++ trunk/libview/ev-view.c Mon Mar 30 01:49:12 2009
@@ -2421,19 +2421,21 @@
cairo_t *cr;
gint i;
- if (view->animation && ev_transition_animation_ready (view->animation)) {
- GdkRectangle page_area;
- GtkBorder border;
-
- if (get_page_extents (view, view->current_page, &page_area, &border)) {
- cr = gdk_cairo_create (view->layout.bin_window);
+ if (view->animation) {
+ if (ev_transition_animation_ready (view->animation)) {
+ GdkRectangle page_area;
+ GtkBorder border;
- /* normalize to x=0, y=0 */
- cairo_translate (cr, page_area.x, page_area.y);
- page_area.x = page_area.y = 0;
+ if (get_page_extents (view, view->current_page, &page_area, &border)) {
+ cr = gdk_cairo_create (view->layout.bin_window);
- ev_transition_animation_paint (view->animation, cr, page_area);
- cairo_destroy (cr);
+ /* normalize to x=0, y=0 */
+ cairo_translate (cr, page_area.x, page_area.y);
+ page_area.x = page_area.y = 0;
+
+ ev_transition_animation_paint (view->animation, cr, page_area);
+ cairo_destroy (cr);
+ }
}
return TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]