Commit 4f3837c3 authored by Jeremie Knuesel's avatar Jeremie Knuesel

Remove Cairo 1.14 version checks

They're no longer needed since GTK+ 3.22 depends on Cairo >= 1.14
parent 1a12214a
......@@ -496,7 +496,6 @@ zathura_page_widget_get_property(GObject* object, guint prop_id, GValue* value,
}
}
#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1,14,0)
static zathura_device_factors_t
get_safe_device_factors(cairo_surface_t* surface)
{
......@@ -512,13 +511,6 @@ get_safe_device_factors(cairo_surface_t* surface)
return factors;
}
#else
static zathura_device_factors_t
get_safe_device_factors(cairo_surface_t* UNUSED(surface))
{
return (zathura_device_factors_t){1.0, 1.0};
}
#endif
static gboolean
zathura_page_widget_draw(GtkWidget* widget, cairo_t* cairo)
......
......@@ -747,20 +747,18 @@ render(render_job_t* job, ZathuraRenderRequest* request, ZathuraRenderer* render
&page_height, &page_width,
false);
#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1,14,0)
zathura_device_factors_t device_factors = zathura_document_get_device_factors(document);
page_width *= device_factors.x;
page_height *= device_factors.y;
#endif
cairo_surface_t* surface = cairo_image_surface_create(CAIRO_FORMAT_RGB24,
page_width, page_height);
if (surface == NULL) {
return false;
}
#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1,14,0)
cairo_surface_set_device_scale(surface, device_factors.x, device_factors.y);
#endif
if (cairo_surface_status(surface) != CAIRO_STATUS_SUCCESS) {
cairo_surface_destroy(surface);
return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment