control: tag -1 upstream patch

On Sat, Nov 05, 2016 at 07:06:04PM -0400, Steven Gawroriski wrote:
> Taking a look at this myself.

Thanks for doing it.

> I wrote the attached patch which essentially byte swaps the value
> before this function returns. The cursors are drawn correctly and
> Inkscape can now be used much more easily.

Thanks for the patch!

> If a contributor agreement
> is required then I would accept giving away my copyright for the code
> contained in this patch.

No CLA or stuff is needed, no.

Though, I'd like to ask you to foward this patch upstream.  It's enough to
open a MR against
https://code.launchpad.net/~inkscape.dev/inkscape/trunk for it.

Could you do it?

> Description: Swap before return sp_cursor_pixbuf_from_xpm on big endian.
>  This byte swaps before the return in sp_cursor_pixbuf_from_xpm on big
>  endian systems so that the cursor is made visible on these systems.
> Author: Steven Gawroriski <ste...@multiphasicapps.net>
> 
> ---
> 
> Origin: other
> Bug-Debian: https://bugs.debian.org/841853
> 
> --- inkscape-0.91.orig/src/sp-cursor.cpp
> +++ inkscape-0.91/src/sp-cursor.cpp
> @@ -106,6 +106,14 @@ GdkPixbuf *sp_cursor_pixbuf_from_xpm(gch
>              pixmap_buffer[y * width + x] = (it == colorMap.end()) ? 0u : 
> it->second;
>          }
>      }
> +    

↑↑↑ be aware of these 4 trailing whitespaces, some people don't like
them.

> +#if G_BYTE_ORDER == G_BIG_ENDIAN
> +    for (int i = 0, n = width * height; i < n; i++)
> +    {
> +        guint32 v = pixmap_buffer[i];
> +        pixmap_buffer[i] = ((v & 0xFF) << 24) | (((v >> 8) & 0xFF) << 16) | 
> (((v >> 16) & 0xFF) << 8) | ((v >> 24) & 0xFF);
> +    }
> +#endif
>  
>      return 
> gdk_pixbuf_new_from_data(reinterpret_cast<guchar*>(pixmap_buffer), 
> GDK_COLORSPACE_RGB, TRUE, 8, width, height, width * sizeof(guint32), 
> free_cursor_data, NULL);
>  }

-- 
regards,
                        Mattia Rizzolo

GPG Key: 66AE 2B4A FCCF 3F52 DA18  4D18 4B04 3FCD B944 4540      .''`.
more about me:  https://mapreri.org                             : :'  :
Launchpad user: https://launchpad.net/~mapreri                  `. `'`
Debian QA page: https://qa.debian.org/developer.php?login=mattia  `-

Attachment: signature.asc
Description: PGP signature

_______________________________________________
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers

Reply via email to