mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-29 00:25:59 +01:00
Penalize large render jobs during zooming
All but the last jobs during zooming are aborted, so let smaller jobs go faster.
This commit is contained in:
parent
757f3d8257
commit
25e88a114a
1 changed files with 4 additions and 1 deletions
|
@ -458,7 +458,10 @@ zathura_page_widget_draw(GtkWidget* widget, cairo_t* cairo)
|
||||||
cairo_set_operator(cairo, CAIRO_OPERATOR_SOURCE);
|
cairo_set_operator(cairo, CAIRO_OPERATOR_SOURCE);
|
||||||
cairo_paint(cairo);
|
cairo_paint(cairo);
|
||||||
cairo_restore(cairo);
|
cairo_restore(cairo);
|
||||||
zathura_render_request(priv->render_request, g_get_real_time());
|
/* All but the last jobs requested here are aborted during zooming.
|
||||||
|
* Processing and aborting smaller jobs first improves responsiveness. */
|
||||||
|
const gint64 penalty = pwidth * pheight;
|
||||||
|
zathura_render_request(priv->render_request, g_get_real_time() + penalty);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue