From d82e7fed684814b37b3306114b66faaaa2336a1b Mon Sep 17 00:00:00 2001 From: Jim Evins Date: Thu, 3 May 2007 01:47:24 +0000 Subject: [PATCH] 2007-05-02 Jim Evins * src/view.c: (draw_select_region_layer), (motion_notify_event_cb), (button_release_event_cb): Removed attempt at rendering optimization by clipping the updates to areas affected -- this actually seemed to hurt update performance. git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/trunk@657 f5e0f49d-192f-0410-a22d-a8d8700d0965 --- glabels2/ChangeLog | 7 +++++++ glabels2/src/view.c | 16 ++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/glabels2/ChangeLog b/glabels2/ChangeLog index 997bc085..6c5e4b63 100644 --- a/glabels2/ChangeLog +++ b/glabels2/ChangeLog @@ -1,3 +1,10 @@ +2007-05-02 Jim Evins + + * src/view.c: (draw_select_region_layer), (motion_notify_event_cb), + (button_release_event_cb): + Removed attempt at rendering optimization by clipping the updates + to areas affected -- this actually seemed to hurt update performance. + 2007-04-30 Jim Evins * src/color.h: diff --git a/glabels2/src/view.c b/glabels2/src/view.c index 5587b6db..d6847f15 100644 --- a/glabels2/src/view.c +++ b/glabels2/src/view.c @@ -968,6 +968,10 @@ draw_select_region_layer (glView *view, w = fabs (view->select_region.x2 - view->select_region.x1); h = fabs (view->select_region.y2 - view->select_region.y1); + cairo_save (cr); + + cairo_set_antialias (cr, CAIRO_ANTIALIAS_NONE); + cairo_rectangle (cr, x1, y1, w, h); cairo_set_source_rgba (cr, SELECT_FILL_RGBA_ARGS); @@ -976,6 +980,8 @@ draw_select_region_layer (glView *view, cairo_set_line_width (cr, SELECT_LINE_WIDTH_PIXELS/(view->home_scale * view->zoom)); cairo_set_source_rgba (cr, SELECT_LINE_RGBA_ARGS); cairo_stroke (cr); + + cairo_restore (cr); } } @@ -3205,10 +3211,16 @@ motion_notify_event_cb (glView *view, break; case GL_VIEW_ARROW_SELECT_REGION: +#ifdef CLIP_UPDATES gl_view_update_region (view, cr, &view->select_region); +#endif view->select_region.x2 = x; view->select_region.y2 = y; +#ifdef CLIP_UPDATES gl_view_update_region (view, cr, &view->select_region); +#else + gl_view_update (view); +#endif break; case GL_VIEW_ARROW_MOVE: @@ -3485,7 +3497,11 @@ button_release_event_cb (glView *view, break; case GL_VIEW_ARROW_SELECT_REGION: +#ifdef CLIP_UPDATES gl_view_update_region (view, cr, &view->select_region); +#else + gl_view_update (view); +#endif view->select_region_visible = FALSE; view->select_region.x2 = x; -- 2.39.5