summaryrefslogtreecommitdiff
path: root/libview/ev-view.c
diff options
context:
space:
mode:
authorJason Crain <[email protected]>2013-06-17 19:31:03 +0200
committerraveit65 <[email protected]>2017-09-06 18:25:34 +0200
commit7f405ab2ff461b8053100e1027497e27095881ee (patch)
tree8ba1117ceff0ba4fede614794fd3bd31b7510ca4 /libview/ev-view.c
parentd758271a60f8d081d1a0701b48d68981dcad9804 (diff)
downloadatril-7f405ab2ff461b8053100e1027497e27095881ee.tar.bz2
atril-7f405ab2ff461b8053100e1027497e27095881ee.tar.xz
libview: Split ev_pixbuf_cache_get_selection_surface into two functions
ev_pixbuf_cache_get_selection_surface returns the selection surface, and new function ev_pixbuf_cache_get_selection_region returns the selection region. https://bugzilla.gnome.org/show_bug.cgi?id=669022 origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=90d6580
Diffstat (limited to 'libview/ev-view.c')
-rw-r--r--libview/ev-view.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/libview/ev-view.c b/libview/ev-view.c
index 99604221..e4a351f8 100644
--- a/libview/ev-view.c
+++ b/libview/ev-view.c
@@ -5581,15 +5581,17 @@ draw_one_page (EvView *view,
return;
selection_surface = ev_pixbuf_cache_get_selection_surface (view->pixbuf_cache,
- page,
- view->scale,
- &region);
+ page,
+ view->scale);
if (selection_surface) {
draw_surface (cr, selection_surface, overlap.x, overlap.y, offset_x, offset_y,
width, height);
return;
}
+ region = ev_pixbuf_cache_get_selection_region (view->pixbuf_cache,
+ page,
+ view->scale);
if (region) {
double scale_x, scale_y;
GdkRGBA color;
@@ -7362,13 +7364,11 @@ merge_selection_region (EvView *view,
/* seed the cache with a new page. We are going to need the new
* region too. */
if (new_sel) {
- cairo_region_t *tmp_region = NULL;
-
- ev_pixbuf_cache_get_selection_surface (view->pixbuf_cache,
- cur_page,
- view->scale,
- &tmp_region);
+ cairo_region_t *tmp_region;
+ tmp_region = ev_pixbuf_cache_get_selection_region (view->pixbuf_cache,
+ cur_page,
+ view->scale);
if (tmp_region && !cairo_region_is_empty (tmp_region)) {
new_sel->covered_region = cairo_region_reference (tmp_region);
}