Re: [PATCH spice-common] canvas-base: Do not attempt useless cast on stride adjustment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 
> On 06/21/2017 10:41 AM, Christophe Fergeau wrote:
> > On Tue, Jun 20, 2017 at 08:39:44PM +0300, Uri Lublin wrote:
> >> On 06/20/2017 04:52 PM, Frediano Ziglio wrote:
> >>> memmove already deal with any alignment so there's no
> >>> reason to have row byte pointer cast to uint32_t.
> >>
> >> Hi Frediano,
> >>
> >> I think the code has no problem with memmove itself, but
> >> with the pointer used later being not-aligned (but only for
> >> non-x86 arch ?).
> > 
> > "later" ? The only uses of dest_aligned/dest_misaligned in this function
> > are as args to memmove, for which alignment does not matter.
> 
> With "later" I meant the callers of canvas_fix_alignment, and
> likely "later" pixman.
> The image is going to get accessed by pixman that probably
> expects rows to be aligned, which is why the bits are memmove'd.
> 
> SPICE_ALIGNED_CAST can verify (if configured for it) that the
> pointer is indeed aligned.
> 
> Uri.
> 

The image is allocated by pixman itself in the way pixman want it.
The code is there to fix alignment from network which has no padding
for rows.

Frediano
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]