[evince/rendering-cleanup] [libview] Port to latest rendering-cleanup-next branch
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince/rendering-cleanup] [libview] Port to latest rendering-cleanup-next branch
- Date: Tue, 14 Sep 2010 16:12:31 +0000 (UTC)
commit 833a1b056af6e62cc8bda4f3ce00c0e9220ad6b7
Author: Christian Persch <chpe gnome org>
Date: Tue Sep 14 18:12:12 2010 +0200
[libview] Port to latest rendering-cleanup-next branch
libview/ev-view-presentation.c | 20 +++++++++++++-------
libview/ev-view.c | 10 +++-------
2 files changed, 16 insertions(+), 14 deletions(-)
---
diff --git a/libview/ev-view-presentation.c b/libview/ev-view-presentation.c
index 75e2e77..99779b4 100644
--- a/libview/ev-view-presentation.c
+++ b/libview/ev-view-presentation.c
@@ -1014,9 +1014,7 @@ ev_view_presentation_draw_end_page (EvViewPresentation *pview,
#if GTK_CHECK_VERSION (2, 90, 8)
static gboolean
ev_view_presentation_draw (GtkWidget *widget,
- cairo_t *cr,
- int draw_width G_GNUC_UNUSED,
- int draw_height G_GNUC_UNUSED)
+ cairo_t *cr)
#else
static gboolean
ev_view_presentation_expose_event (GtkWidget *widget,
@@ -1056,7 +1054,9 @@ ev_view_presentation_expose_event (GtkWidget *widget,
if (ev_transition_animation_ready (pview->animation)) {
ev_view_presentation_get_page_area (pview, &page_area);
-#if !GTK_CHECK_VERSION (2, 90, 8)
+#if GTK_CHECK_VERSION (2, 90, 8)
+ cairo_save (cr);
+#else
cr = gdk_cairo_create (gtk_widget_get_window (widget));
#endif
@@ -1069,7 +1069,9 @@ ev_view_presentation_expose_event (GtkWidget *widget,
ev_transition_animation_paint (pview->animation, cr, page_area);
-#if !GTK_CHECK_VERSION (2, 90, 8)
+#if GTK_CHECK_VERSION (2, 90, 8)
+ cairo_restore (cr);
+#else
cairo_destroy (cr);
#endif
}
@@ -1088,7 +1090,9 @@ ev_view_presentation_expose_event (GtkWidget *widget,
ev_view_presentation_get_page_area (pview, &page_area);
if (gdk_rectangle_intersect (&page_area, area, &overlap)) {
-#if !GTK_CHECK_VERSION (2, 90, 8)
+#if GTK_CHECK_VERSION (2, 90, 8)
+ cairo_save (cr);
+#else
cr = gdk_cairo_create (gtk_widget_get_window (widget));
#endif
@@ -1100,7 +1104,9 @@ ev_view_presentation_expose_event (GtkWidget *widget,
cairo_set_source_surface (cr, surface, page_area.x, page_area.y);
cairo_fill (cr);
-#if !GTK_CHECK_VERSION (2, 90, 8)
+#if GTK_CHECK_VERSION (2, 90, 8)
+ cairo_restore (cr);
+#else
cairo_destroy (cr);
#endif
}
diff --git a/libview/ev-view.c b/libview/ev-view.c
index 0eb0611..3006d71 100644
--- a/libview/ev-view.c
+++ b/libview/ev-view.c
@@ -157,9 +157,7 @@ static gboolean ev_view_scroll_event (GtkWidget
GdkEventScroll *event);
#if GTK_CHECK_VERSION (2, 90, 8)
static gboolean ev_view_draw (GtkWidget *widget,
- cairo_t *cr,
- int draw_width,
- int draw_height);
+ cairo_t *cr);
#else
static gboolean ev_view_expose_event (GtkWidget *widget,
GdkEventExpose *event);
@@ -3319,9 +3317,7 @@ find_selection_for_page (EvView *view,
#if GTK_CHECK_VERSION (2, 90, 8)
static gboolean
ev_view_draw (GtkWidget *widget,
- cairo_t *cr,
- int draw_width G_GNUC_UNUSED,
- int draw_height G_GNUC_UNUSED)
+ cairo_t *cr)
#else
static gboolean
ev_view_expose_event (GtkWidget *widget,
@@ -3386,7 +3382,7 @@ ev_view_expose_event (GtkWidget *widget,
#if GTK_CHECK_VERSION (2, 90, 8)
if (GTK_WIDGET_CLASS (ev_view_parent_class)->draw)
- GTK_WIDGET_CLASS (ev_view_parent_class)->draw (widget, cr, draw_width, draw_height);
+ GTK_WIDGET_CLASS (ev_view_parent_class)->draw (widget, cr);
#else
cairo_destroy (cr);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]