[evince] [libview] Don't pass rotation and scale to pixbuf-cache



commit 43f0699bd214872e7389013214d0196a22d5368f
Author: Carlos Garcia Campos <carlosgc gnome org>
Date:   Mon May 31 18:31:36 2010 +0200

    [libview] Don't pass rotation and scale to pixbuf-cache

 libview/ev-pixbuf-cache.c |   13 +++++++------
 libview/ev-pixbuf-cache.h |    2 --
 libview/ev-view.c         |    2 --
 3 files changed, 7 insertions(+), 10 deletions(-)
---
diff --git a/libview/ev-pixbuf-cache.c b/libview/ev-pixbuf-cache.c
index d4ab922..1412236 100644
--- a/libview/ev-pixbuf-cache.c
+++ b/libview/ev-pixbuf-cache.c
@@ -464,7 +464,9 @@ ev_pixbuf_cache_get_preload_size (EvPixbufCache *pixbuf_cache,
 static void
 ev_pixbuf_cache_update_range (EvPixbufCache *pixbuf_cache,
 			      gint           start_page,
-			      gint           end_page)
+			      gint           end_page,
+			      guint          rotation,
+			      gdouble        scale)
 {
 	CacheJobInfo *new_job_list;
 	CacheJobInfo *new_prev_job = NULL;
@@ -472,8 +474,6 @@ ev_pixbuf_cache_update_range (EvPixbufCache *pixbuf_cache,
 	gint          new_preload_cache_size;
 	guint         new_job_list_len;
 	int           i, page;
-	gdouble       scale = ev_document_model_get_scale (pixbuf_cache->model);
-	gint          rotation = ev_document_model_get_rotation (pixbuf_cache->model);
 
 	new_preload_cache_size = ev_pixbuf_cache_get_preload_size (pixbuf_cache,
 								   start_page,
@@ -739,10 +739,11 @@ void
 ev_pixbuf_cache_set_page_range (EvPixbufCache  *pixbuf_cache,
 				gint            start_page,
 				gint            end_page,
-				gint            rotation,
-				gfloat          scale,
 				GList          *selection_list)
 {
+	gdouble scale = ev_document_model_get_scale (pixbuf_cache->model);
+	gint    rotation = ev_document_model_get_rotation (pixbuf_cache->model);
+
 	g_return_if_fail (EV_IS_PIXBUF_CACHE (pixbuf_cache));
 
 	g_return_if_fail (start_page >= 0 && start_page < ev_document_get_n_pages (pixbuf_cache->document));
@@ -751,7 +752,7 @@ ev_pixbuf_cache_set_page_range (EvPixbufCache  *pixbuf_cache,
 
 	/* First, resize the page_range as needed.  We cull old pages
 	 * mercilessly. */
-	ev_pixbuf_cache_update_range (pixbuf_cache, start_page, end_page);
+	ev_pixbuf_cache_update_range (pixbuf_cache, start_page, end_page, rotation, scale);
 
 	/* Then, we update the current jobs to see if any of them are the wrong
 	 * size, we remove them if we need to. */
diff --git a/libview/ev-pixbuf-cache.h b/libview/ev-pixbuf-cache.h
index bdf6743..a2c190a 100644
--- a/libview/ev-pixbuf-cache.h
+++ b/libview/ev-pixbuf-cache.h
@@ -63,8 +63,6 @@ void           ev_pixbuf_cache_set_max_size         (EvPixbufCache   *pixbuf_cac
 void           ev_pixbuf_cache_set_page_range       (EvPixbufCache *pixbuf_cache,
 						     gint           start_page,
 						     gint           end_page,
-						     gint	    rotation,
-						     gfloat         scale,
 						     GList          *selection_list);
 cairo_surface_t *ev_pixbuf_cache_get_surface        (EvPixbufCache *pixbuf_cache,
 						     gint           page);
diff --git a/libview/ev-view.c b/libview/ev-view.c
index c26aabc..92190f5 100644
--- a/libview/ev-view.c
+++ b/libview/ev-view.c
@@ -730,8 +730,6 @@ view_update_range_and_current_page (EvView *view)
 	ev_pixbuf_cache_set_page_range (view->pixbuf_cache,
 					view->start_page,
 					view->end_page,
-					view->rotation,
-					view->scale,
 					view->selection_info.selections);
 
 	if (ev_pixbuf_cache_get_surface (view->pixbuf_cache, view->current_page))



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]