manually revert change to canvas expose handling in fee026c5ef
Breaking out the rectangles implies a z-axis ordering of drawing,because the rect drawn last will implicitly be "on top". But redraw areas are not submitted with any z-axis information, and so drawing like this breaks canvas layering. It would be more efficient to draw the rects separately, but we don't have any ordering information and so we cannot do it correctly.
This commit is contained in:
@@ -607,21 +607,7 @@ bool
|
||||
GtkCanvas::on_expose_event (GdkEventExpose* ev)
|
||||
{
|
||||
Cairo::RefPtr<Cairo::Context> cairo_context = get_window()->create_cairo_context ();
|
||||
|
||||
/* break into regions */
|
||||
|
||||
GdkRectangle *rects;
|
||||
gint n_rects;
|
||||
|
||||
gdk_region_get_rectangles (ev->region, &rects, &n_rects);
|
||||
|
||||
for (gint i = 0; i < n_rects; ++i) {
|
||||
Rect area (rects[i].x, rects[i].y, rects[i].x + rects[i].width, rects[i].y + rects[i].height);
|
||||
render (area, cairo_context);
|
||||
}
|
||||
|
||||
g_free (rects);
|
||||
|
||||
render (Rect (ev->area.x, ev->area.y, ev->area.x + ev->area.width, ev->area.y + ev->area.height), cairo_context);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user