From 8d9c9e059772d7c8cea633d219c0158424f1e2dc Mon Sep 17 00:00:00 2001 From: Carlos Garcia Campos Date: Thu, 27 Jun 2013 15:03:35 +0200 Subject: 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 --- libview/ev-view.c | 8 ++++---- 1 file 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 (); -- cgit v1.2.1