On Fri, 2010-08-27 at 08:51 +0200, Gerd Hoffmann wrote:
> On 08/27/10 08:38, Alexander Larsson wrote:
> > On Fri, 2010-08-27 at 00:09 +0200, Gerd Hoffmann wrote:
> >>
> >> + red->data_size = qxl->data_size;
> >> + size = red_get_data_chunks_ptr(slots, group_id,
> >> + get_memslot_id(slots, addr),
> >> +&chunks,&qxl->chunk);
> >> + data = red_linearize_chunk(&chunks, size,&free_data);
> >> + red_put_data_chunks(&chunks);
> >> + red->data = spice_malloc(size);
> >> + memcpy(red->data, data, size);
> >> +
> >> + if (free_data) {
> >> + free(data);
> >> + }
> >
> > Ack, but this part could be more efficient. In the n_chunks> 1 case the
> > red_linearize_chunk part will already malloc and copy the data so we
> > don't need to do it then.
>
> Right. Incremental patch attached.
Ack
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Alexander Larsson Red Hat, Inc
[email protected] [email protected]
He's a hate-fuelled zombie barbarian looking for a cure to the poison coursing
through his veins. She's a scantily clad cat-loving politician who hides her
beauty behind a pair of thick-framed spectacles. They fight crime!
_______________________________________________
Spice-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/spice-devel