]> git.sur5r.net Git - glabels/commitdiff
2007-05-02 Jim Evins <evins@snaught.com>
authorJim Evins <evins@snaught.com>
Thu, 3 May 2007 01:47:24 +0000 (01:47 +0000)
committerJim Evins <evins@snaught.com>
Thu, 3 May 2007 01:47:24 +0000 (01:47 +0000)
* 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
glabels2/src/view.c

index 997bc0852d3126ede70bb74b796603b6ebcbbe03..6c5e4b63def17e771eac5381e60aa74811406659 100644 (file)
@@ -1,3 +1,10 @@
+2007-05-02  Jim Evins  <evins@snaught.com>
+
+       * 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  <evins@snaught.com>
 
        * src/color.h:
index 5587b6db40cb7b287414def1adc0d5cccd4740c8..d6847f15623bf5d9cd6d10fda2b934ba42b95e67 100644 (file)
@@ -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;