diff src/typedefs.h @ 413:9e521adbf312

Add two new options to control image read buffer at runtime. They are available in Preferences > Advanced > Image loading and caching. Default read buffer size was set to 4096 instead of 512. These options are saved to rc file.
author zas_
date Fri, 18 Apr 2008 22:15:01 +0000
parents 3a9074e73f53
children 4f7362028062
line wrap: on
line diff
--- a/src/typedefs.h	Fri Apr 18 21:53:33 2008 +0000
+++ b/src/typedefs.h	Fri Apr 18 22:15:01 2008 +0000
@@ -158,8 +158,6 @@
 	gint bytes_read;
 	gint bytes_total;
 
-	guint buffer_size;
-
 	gint requested_width;
 	gint requested_height;
 	gint shrunk;
@@ -182,6 +180,10 @@
 	gpointer data_percent;
 
 	gint idle_done_id;
+
+	guchar *read_buffer;
+	gint read_buffer_size;
+	gint idle_read_loop_count;
 };
 
 typedef void (* ThumbLoaderFunc)(ThumbLoader *tl, gpointer data);
@@ -779,6 +781,9 @@
 
 		gint use_custom_border_color;
 		GdkColor border_color;
+
+		gint read_buffer_size; /* bytes to read from file per read() */
+		gint idle_read_loop_count; /* the number of bytes to read per idle call (define x image.read_buffer_size) */
 	} image;
 
 	/* thumbnails */