Additional user option in Edit/Preferences/Image to set the tile size.
</varlistentry>\r
</variablelist>\r
</section>\r
+ <section id="TileSize">\r
+ <title>Tile Size</title>\r
+ <variablelist>\r
+ <varlistentry>\r
+ <term>\r
+ <guilabel>Tile size in pixels</guilabel>\r
+ </term>\r
+ <listitem>\r
+ <para>\r
+ This option is only available when GPU acceleration is not selected. It sets the size in pixels that large images are split into during rendering. Setting a larger value will reduce the tiling effect seen as the image is displayed, but will also slightly increase the delay until the first part of the image is seen.\r
+ </para>\r
+ </listitem>\r
+ </varlistentry>\r
+ </variablelist>\r
+ </section>\r
<section id="Appearance">\r
<title>Appearance</title>\r
<variablelist>\r
options->image.zoom_mode = ZOOM_RESET_NONE;
options->image.zoom_quality = GDK_INTERP_BILINEAR;
options->image.zoom_to_fit_allow_expand = FALSE;
+ options->image.tile_size = 128;
options->image_overlay.template_string = NULL;
options->image_overlay.x = 10;
GdkColor border_color;
GdkColor alpha_color_1;
GdkColor alpha_color_2;
+
+ gint tile_size;
} image;
/* thumbnails */
options->image.max_autofit_size = c_options->image.max_autofit_size;
options->image.max_enlargement_size = c_options->image.max_enlargement_size;
options->image.use_clutter_renderer = c_options->image.use_clutter_renderer;
+ options->image.tile_size = c_options->image.tile_size;
options->progressive_key_scrolling = c_options->progressive_key_scrolling;
options->keyboard_scroll_step = c_options->keyboard_scroll_step;
pref_checkbox_link_sensitivity(ct_button, spin);
gtk_widget_set_tooltip_text(GTK_WIDGET(hbox), _("This value will set the virtual size of the window when \"Fit image to window\" is set. Instead of using the actual size of the window, the specified percentage of the window will be used. It allows one to keep a border around the image (values lower than 100%) or to auto zoom the image (values greater than 100%). It affects fullscreen mode too."));
+ group = pref_group_new(vbox, FALSE, _("Tile size"), GTK_ORIENTATION_VERTICAL);
+ gtk_widget_set_sensitive(group, !options->image.use_clutter_renderer);
+
+ hbox = pref_box_new(group, FALSE, GTK_ORIENTATION_HORIZONTAL, PREF_PAD_SPACE);
+ spin = pref_spin_new_int(hbox, _("Pixels"), _("(Requires restart)"),
+ 128, 4096, 128,
+ options->image.tile_size, &c_options->image.tile_size);
+ gtk_widget_set_tooltip_text(GTK_WIDGET(hbox), _("This value changes the size of the tiles large images are split into. Increasing the size of the tiles will reduce the tiling effect seen on image changes, but will also slightly increase the delay before the first part of a large image is seen."));
+
group = pref_group_new(vbox, FALSE, _("Appearance"), GTK_ORIENTATION_VERTICAL);
pref_checkbox_new_int(group, _("Use custom border color in window mode"),
WRITE_NL(); WRITE_COLOR(*options, image.alpha_color_1);
WRITE_NL(); WRITE_COLOR(*options, image.alpha_color_2);
WRITE_NL(); WRITE_BOOL(*options, image.use_clutter_renderer);
+ WRITE_NL(); WRITE_INT(*options, image.tile_size);
/* Thumbnails Options */
WRITE_NL(); WRITE_INT(*options, thumbnails.max_width);
if (READ_COLOR(*options, image.alpha_color_1)) continue;
if (READ_COLOR(*options, image.alpha_color_2)) continue;
if (READ_BOOL(*options, image.use_clutter_renderer)) continue;
+ if (READ_INT(*options, image.tile_size)) continue;
/* Thumbnails options */
if (READ_INT_CLAMP(*options, thumbnails.max_width, 16, 512)) continue;
} ExifOrientationType;
#endif
-
-/* size to use when breaking up image pane for rendering */
-#define PR_TILE_SIZE 128
-
typedef struct _ImageTile ImageTile;
typedef struct _QueueData QueueData;
// d = gdk_drawable_get_depth(pixmap);
// gdk_drawable_get_size(pixmap, &w, &h);
- return PR_TILE_SIZE * PR_TILE_SIZE * 4 / 8;
+ return options->image.tile_size * options->image.tile_size * 4 / 8;
}
static void rt_hidpi_aware_draw(
rt->f.stereo_set = renderer_stereo_set;
- rt->tile_width = PR_TILE_SIZE;
- rt->tile_height = PR_TILE_SIZE;
+ rt->tile_width = options->image.tile_size;
+ rt->tile_height = options->image.tile_size;
rt->tiles = NULL;
rt->tile_cache_size = 0;