[Spice-devel] [PATCH spice-server 2/2] red_worker: no need to align the stride of internal images

Alon Levy alevy at redhat.com
Wed Nov 28 15:06:19 PST 2012


> On 11/28/2012 05:54 PM, Alon Levy wrote:
> > Why is there no need to align the stride of internal images? what
> > happens if we keep this alignment? Please add the answers to the
> > patch log message.
> >
> Why do you think there may be a need? those images are just read from
> the surface, compressed, and sent to the client. Then, they are
> destroyed.

I was just pointing out that the commit message doesn't contain an explanation and I for one would like to see one.

> >> ---
> >>   server/red_worker.c | 2 +-
> >>   1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/server/red_worker.c b/server/red_worker.c
> >> index 9bab003..8f7f45a 100644
> >> --- a/server/red_worker.c
> >> +++ b/server/red_worker.c
> >> @@ -5065,7 +5065,7 @@ static ImageItem
> >> *red_add_surface_area_image(DisplayChannelClient *dcc, int surf
> >>       width = area->right - area->left;
> >>       height = area->bottom - area->top;
> >>       bpp = SPICE_SURFACE_FMT_DEPTH(surface->context.format) / 8;
> >> -    stride = SPICE_ALIGN(width * bpp, 4);
> >> +    stride = width * bpp;
> >>
> >>       item = (ImageItem *)spice_malloc_n_m(height, stride,
> >>       sizeof(ImageItem));
> >>
> >> --
> >> 1.7.11.7
> >>
> >> _______________________________________________
> >> Spice-devel mailing list
> >> Spice-devel at lists.freedesktop.org
> >> http://lists.freedesktop.org/mailman/listinfo/spice-devel
> >>
> 
> 


More information about the Spice-devel mailing list