mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-28 22:06:02 +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_set_source_rgb(cairo, 1, 1, 1);
|
||||||
cairo_paint(cairo);
|
cairo_paint(cairo);
|
||||||
cairo_restore(cairo);
|
cairo_restore(cairo);
|
||||||
cairo_save(cairo);
|
|
||||||
|
|
||||||
/* apply scale (used by e.g. Poppler as pixels per point) */
|
/* apply scale (used by e.g. Poppler as pixels per point) */
|
||||||
if (fabs(real_scale - 1.0f) > FLT_EPSILON) {
|
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);
|
zathura_renderer_lock(renderer);
|
||||||
const int err = zathura_page_render(page, cairo, false);
|
const int err = zathura_page_render(page, cairo, false);
|
||||||
zathura_renderer_unlock(renderer);
|
zathura_renderer_unlock(renderer);
|
||||||
cairo_restore(cairo);
|
|
||||||
cairo_destroy(cairo);
|
cairo_destroy(cairo);
|
||||||
|
|
||||||
return err == ZATHURA_ERROR_OK;
|
return err == ZATHURA_ERROR_OK;
|
||||||
|
|
Loading…
Reference in a new issue