render canvas using the GDK region rather than the GDK area.
The region is the un-coalesced set of rectangles that were requested for redraw. The area is the coalesced single rectangle. In the worst cases, the coalesced rectangle could span the entire window even though just two pixels in opposite corners were to be redrawn. There is a problem with the verbose cursor as it is dragged across MIDI tracks. TO BE FIXED.
This commit is contained in:
parent
2689848ed7
commit
9fab39358a
@ -787,7 +787,18 @@ GtkCanvas::on_expose_event (GdkEventExpose* ev)
|
|||||||
|
|
||||||
/* render canvas */
|
/* render canvas */
|
||||||
|
|
||||||
|
#ifdef CANVAS_SINGLE_EXPOSE
|
||||||
render (Rect (ev->area.x, ev->area.y, ev->area.x + ev->area.width, ev->area.y + ev->area.height), draw_context);
|
render (Rect (ev->area.x, ev->area.y, ev->area.x + ev->area.width, ev->area.y + ev->area.height), draw_context);
|
||||||
|
#else
|
||||||
|
GdkRectangle* rects;
|
||||||
|
gint nrects;
|
||||||
|
|
||||||
|
gdk_region_get_rectangles (ev->region, &rects, &nrects);
|
||||||
|
for (gint n = 0; n < nrects; ++n) {
|
||||||
|
render (Rect (rects[n].x, rects[n].y, rects[n].x + rects[n].width, rects[n].y + rects[n].height), draw_context);
|
||||||
|
}
|
||||||
|
g_free (rects);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef USE_CAIRO_IMAGE_SURFACE
|
#ifdef USE_CAIRO_IMAGE_SURFACE
|
||||||
/* now blit our private surface back to the GDK one */
|
/* now blit our private surface back to the GDK one */
|
||||||
|
Loading…
Reference in New Issue
Block a user