mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-27 14:16:01 +01:00
remove unneeded cairo save and restore
Cairo frees its "saved state stack" automatically on a call to `cairo_destroy()`.
This commit is contained in:
parent
a5334bab67
commit
ea65e189c3
1 changed files with 0 additions and 2 deletions
|
@ -775,7 +775,6 @@ render_to_cairo_surface(cairo_surface_t* surface, zathura_page_t* page, ZathuraR
|
|||
cairo_set_source_rgb(cairo, 1, 1, 1);
|
||||
cairo_paint(cairo);
|
||||
cairo_restore(cairo);
|
||||
cairo_save(cairo);
|
||||
|
||||
/* apply scale (used by e.g. Poppler as pixels per point) */
|
||||
if (fabs(real_scale - 1.0f) > FLT_EPSILON) {
|
||||
|
@ -785,7 +784,6 @@ render_to_cairo_surface(cairo_surface_t* surface, zathura_page_t* page, ZathuraR
|
|||
zathura_renderer_lock(renderer);
|
||||
const int err = zathura_page_render(page, cairo, false);
|
||||
zathura_renderer_unlock(renderer);
|
||||
cairo_restore(cairo);
|
||||
cairo_destroy(cairo);
|
||||
|
||||
return err == ZATHURA_ERROR_OK;
|
||||
|
|
Loading…
Reference in a new issue