[evince] libview: Invalidate union of old and new selection
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince] libview: Invalidate union of old and new selection
- Date: Thu, 27 Jun 2013 13:05:30 +0000 (UTC)
commit 9fd3d7d9182ecd820b699da232930a23e57ca3c7
Author: Jason Crain <jason aquaticape us>
Date: Mon Jun 24 23:35:27 2013 -0500
libview: Invalidate union of old and new selection
Instead of using xor, use the union of old_sel and new_sel to find
what needs redrawing.
https://bugzilla.gnome.org/show_bug.cgi?id=703024
libview/ev-view.c | 18 +++---------------
1 files changed, 3 insertions(+), 15 deletions(-)
---
diff --git a/libview/ev-view.c b/libview/ev-view.c
index 3331cc4..4bc12e7 100644
--- a/libview/ev-view.c
+++ b/libview/ev-view.c
@@ -7285,22 +7285,10 @@ merge_selection_region (EvView *view,
/* Now we figure out what needs redrawing */
if (old_sel && new_sel) {
if (old_sel->covered_region && new_sel->covered_region) {
- /* We only want to redraw the areas that have
- * changed, so we xor the old and new regions
- * and redraw if it's different */
+ /* Anything that was previously or currently selected may
+ * have changed */
region = cairo_region_copy (old_sel->covered_region);
-#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 9, 12)
- cairo_region_xor (region, new_sel->covered_region);
-#else
- cairo_region_t *tbr;
- tbr = cairo_region_copy (new_sel->covered_region);
-
- /* xor old_sel, new_sel*/
- cairo_region_subtract (tbr, region);
- cairo_region_subtract (region, new_sel->covered_region);
- cairo_region_union (region, tbr);
- cairo_region_destroy (tbr);
-#endif
+ cairo_region_union (region, new_sel->covered_region);
if (cairo_region_is_empty (region)) {
cairo_region_destroy (region);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]