mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-29 11:26:01 +01:00
Remove HAVE_HIDPI_SUPPORT
One can simply check the Cairo version now that GTK+ has been bumped to 3.10.
This commit is contained in:
parent
29b6e45c02
commit
e0cf06ff05
3 changed files with 3 additions and 9 deletions
|
@ -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.
|
# To disable support for mimetype detction with libmagic set WITH_MAGIC to 0.
|
||||||
WITH_MAGIC ?= 1
|
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
|
# paths
|
||||||
PREFIX ?= /usr
|
PREFIX ?= /usr
|
||||||
MANPREFIX ?= ${PREFIX}/share/man
|
MANPREFIX ?= ${PREFIX}/share/man
|
||||||
|
|
|
@ -448,7 +448,7 @@ zathura_page_widget_draw(GtkWidget* widget, cairo_t* cairo)
|
||||||
unsigned int pheight = (rotation % 180 ? page_width : page_height);
|
unsigned int pheight = (rotation % 180 ? page_width : page_height);
|
||||||
unsigned int pwidth = (rotation % 180 ? page_height : page_width);
|
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_x;
|
||||||
double device_scale_y;
|
double device_scale_y;
|
||||||
cairo_surface_get_device_scale(priv->thumbnail, &device_scale_x, &device_scale_y);
|
cairo_surface_get_device_scale(priv->thumbnail, &device_scale_x, &device_scale_y);
|
||||||
|
|
|
@ -740,7 +740,7 @@ render(render_job_t* job, ZathuraRenderRequest* request, ZathuraRenderer* render
|
||||||
&page_height, &page_width,
|
&page_height, &page_width,
|
||||||
false);
|
false);
|
||||||
|
|
||||||
#ifdef HAVE_HIDPI_SUPPORT
|
#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1,14,0)
|
||||||
double device_scale_x;
|
double device_scale_x;
|
||||||
double device_scale_y;
|
double device_scale_y;
|
||||||
zathura_document_get_device_scale(document, &device_scale_x, &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;
|
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) {
|
if (device_scale_x != 0.0 && device_scale_y != 0.0) {
|
||||||
cairo_surface_set_device_scale(surface, device_scale_x, device_scale_y);
|
cairo_surface_set_device_scale(surface, device_scale_x, device_scale_y);
|
||||||
if (cairo_surface_status(surface) != CAIRO_STATUS_SUCCESS) {
|
if (cairo_surface_status(surface) != CAIRO_STATUS_SUCCESS) {
|
||||||
|
|
Loading…
Reference in a new issue