Hi, On 02/19/13 00:56, Anthony Liguori wrote: > +static void gd_resize(DisplayState *ds) > +{ > + GtkDisplayState *s = ds->opaque; > + cairo_format_t kind; > + int stride; > + > + DPRINTF("resize(width=%d, height=%d)\n", > + ds_get_width(ds), ds_get_height(ds)); > + > + if (s->surface) { > + cairo_surface_destroy(s->surface); > + }
Isn't cairo backed by pixman under the hood? I suspect you should be able to simply pass the pixman image (ds->surface->image) directly to cairo for rendering, thereby making this function alot simpler. cheers, Gerd