summaryrefslogtreecommitdiff
path: root/libview/ev-view.c
diff options
context:
space:
mode:
authorCarlos Garcia Campos <[email protected]>2013-06-27 15:03:35 +0200
committerraveit65 <[email protected]>2017-09-06 18:25:34 +0200
commit8d9c9e059772d7c8cea633d219c0158424f1e2dc (patch)
treefa2c01e2baf6fa05bea7d8b1d57cd7d72c00aad2 /libview/ev-view.c
parent0ee1072cd93969ce37071942bfe3241ad3e63910 (diff)
downloadatril-8d9c9e059772d7c8cea633d219c0158424f1e2dc.tar.bz2
atril-8d9c9e059772d7c8cea633d219c0158424f1e2dc.tar.xz
libview: Avoid unnecessary region copies when selecting text
Now that we always build a new damage region, we don't need to copy the selection covered region. origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=7a7ebb8
Diffstat (limited to 'libview/ev-view.c')
-rw-r--r--libview/ev-view.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libview/ev-view.c b/libview/ev-view.c
index 0728bc41..89458b95 100644
--- a/libview/ev-view.c
+++ b/libview/ev-view.c
@@ -7605,17 +7605,17 @@ merge_selection_region (EvView *view,
cairo_region_union (region, new_sel->covered_region);
}
} else if (old_sel->covered_region) {
- region = cairo_region_copy (old_sel->covered_region);
+ region = cairo_region_reference (old_sel->covered_region);
} else if (new_sel->covered_region) {
- region = cairo_region_copy (new_sel->covered_region);
+ region = cairo_region_reference (new_sel->covered_region);
}
} else if (old_sel && !new_sel) {
if (old_sel->covered_region && !cairo_region_is_empty (old_sel->covered_region)) {
- region = cairo_region_copy (old_sel->covered_region);
+ region = cairo_region_reference (old_sel->covered_region);
}
} else if (!old_sel && new_sel) {
if (new_sel->covered_region && !cairo_region_is_empty (new_sel->covered_region)) {
- region = cairo_region_copy (new_sel->covered_region);
+ region = cairo_region_reference (new_sel->covered_region);
}
} else {
g_assert_not_reached ();