summaryrefslogtreecommitdiff
path: root/libview/ev-pixbuf-cache.c
diff options
context:
space:
mode:
authorOwen W. Taylor <[email protected]>2014-02-27 19:20:17 -0500
committerraveit65 <[email protected]>2018-03-26 13:49:10 +0200
commit2cae078d88eb5e7d2e5891cb03cdb90b7852cc03 (patch)
treef84769194aa271da86cedc7a686adc931df91414 /libview/ev-pixbuf-cache.c
parent7cb00e9dea3de02f61bda3c05133a04f4605e0ac (diff)
downloadatril-2cae078d88eb5e7d2e5891cb03cdb90b7852cc03.tar.bz2
atril-2cae078d88eb5e7d2e5891cb03cdb90b7852cc03.tar.xz
EvView: render correctly on hi-dpi displays
Make EvPixbufCache generate surfaces with extra resolution based on gtk_widget_get_scale_factor(). Handle cairo surfaces with a device scale in ev_view_draw(). Trigger an update of the pixbuf cache when the scale factor changes. https://bugzilla.gnome.org/show_bug.cgi?id=723431 origin commit: https://git.gnome.org/browse/evince/commit/?id=a612f8
Diffstat (limited to 'libview/ev-pixbuf-cache.c')
-rw-r--r--libview/ev-pixbuf-cache.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libview/ev-pixbuf-cache.c b/libview/ev-pixbuf-cache.c
index 6db650fc..89c5cd5e 100644
--- a/libview/ev-pixbuf-cache.c
+++ b/libview/ev-pixbuf-cache.c
@@ -296,9 +296,9 @@ copy_job_to_job_info (EvJobRender *job_render,
job_info->selection_points = job_render->selection_points;
job_info->selection = cairo_surface_reference (job_render->selection);
- job_info->selection_scale = job_render->scale;
if (job_info->selection)
set_device_scale_on_surface (job_info->selection, job_info->device_scale);
+ job_info->selection_scale = job_render->scale * job_info->device_scale;
g_assert (job_info->selection_points.x1 >= 0);
job_info->selection_region_points = job_render->selection_points;
@@ -1093,7 +1093,7 @@ ev_pixbuf_cache_get_selection_surface (EvPixbufCache *pixbuf_cache,
if (job_info->selection)
set_device_scale_on_surface (job_info->selection, job_info->device_scale);
job_info->selection_points = job_info->target_points;
- job_info->selection_scale = scale;
+ job_info->selection_scale = scale * job_info->device_scale;
g_object_unref (rc);
ev_document_doc_mutex_unlock ();
}