From e0cf06ff058266f54faabad0516e5945e06233af Mon Sep 17 00:00:00 2001 From: Jeremie Knuesel Date: Tue, 23 Jan 2018 22:22:38 +0100 Subject: [PATCH] Remove HAVE_HIDPI_SUPPORT One can simply check the Cairo version now that GTK+ has been bumped to 3.10. --- config.mk | 6 ------ zathura/page-widget.c | 2 +- zathura/render.c | 4 ++-- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/config.mk b/config.mk index 05fffec..d40a334 100644 --- a/config.mk +++ b/config.mk @@ -47,12 +47,6 @@ WITH_SYNCTEX ?= $(shell (${PKG_CONFIG} synctex && echo 1) || echo 0) # To disable support for mimetype detction with libmagic set WITH_MAGIC to 0. WITH_MAGIC ?= 1 -# HiDPI -HIDPI_SUPPORT_CAIRO = $(shell (${PKG_CONFIG} --atleast-version=1.14 cairo && echo 1) || echo 0) -ifeq (${HIDPI_SUPPORT_CAIRO},1) -CPPFLAGS += -DHAVE_HIDPI_SUPPORT -endif - # paths PREFIX ?= /usr MANPREFIX ?= ${PREFIX}/share/man diff --git a/zathura/page-widget.c b/zathura/page-widget.c index c6e170e..8067d3d 100644 --- a/zathura/page-widget.c +++ b/zathura/page-widget.c @@ -448,7 +448,7 @@ zathura_page_widget_draw(GtkWidget* widget, cairo_t* cairo) unsigned int pheight = (rotation % 180 ? page_width : page_height); unsigned int pwidth = (rotation % 180 ? page_height : page_width); -#ifdef HAVE_HIDPI_SUPPORT +#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1,14,0) double device_scale_x; double device_scale_y; cairo_surface_get_device_scale(priv->thumbnail, &device_scale_x, &device_scale_y); diff --git a/zathura/render.c b/zathura/render.c index 6c5db86..a890e49 100644 --- a/zathura/render.c +++ b/zathura/render.c @@ -740,7 +740,7 @@ render(render_job_t* job, ZathuraRenderRequest* request, ZathuraRenderer* render &page_height, &page_width, false); -#ifdef HAVE_HIDPI_SUPPORT +#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1,14,0) double device_scale_x; double device_scale_y; zathura_document_get_device_scale(document, &device_scale_x, &device_scale_y); @@ -761,7 +761,7 @@ render(render_job_t* job, ZathuraRenderRequest* request, ZathuraRenderer* render return false; } -#ifdef HAVE_HIDPI_SUPPORT +#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1,14,0) if (device_scale_x != 0.0 && device_scale_y != 0.0) { cairo_surface_set_device_scale(surface, device_scale_x, device_scale_y); if (cairo_surface_status(surface) != CAIRO_STATUS_SUCCESS) {