[Spice-devel] [5/ ]QUIC_IMAGE_TYPE_RGB24 decodes the same as QUIC_IMAGE_TYPE_RGB32

Christophe Fergeau cfergeau at redhat.com
Fri Sep 28 11:32:40 PDT 2012


On Mon, Sep 24, 2012 at 10:49:53AM -0500, Aric Stewart wrote:
> Signed-off-by: Aric Stewart <aric at codeweavers.com>
> @@ -1014,7 +1012,7 @@ QuicEncoder.prototype.simple_quic_decode = function(buf)
>     var stride = 4; /* FIXME - proper stride calc please */
>     if (!this.quic_decode_begin(buf))
>         return undefined;
> -    if (this.type != QUIC_IMAGE_TYPE_RGB32 && this.type != QUIC_IMAGE_TYPE_RGBA)
> +    if (this.type != QUIC_IMAGE_TYPE_RGB32 && this.type != QUIC_IMAGE_TYPE_RGB24)
>         return undefined;
>     var out = new Uint8Array(this.width*this.height*4);
>     out[0] = 69;
> @@ -1057,7 +1055,7 @@ function convert_spice_quic_to_web(context, spice_quic)
>         ret.data[i + 0] = spice_quic.outptr[i + 2];
>         ret.data[i + 1] = spice_quic.outptr[i + 1];
>         ret.data[i + 2] = spice_quic.outptr[i + 0];
> -        if (spice_quic.type == 4)
> +        if (spice_quic.type !== QUIC_IMAGE_TYPE_RGBA)
>             ret.data[i + 3] = 255;
>         else
>             ret.data[i + 3] = spice_quic.outptr[i + 3];

Looks like the end of the patch is mixed with unrelated RGBA changes?

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20120928/df2a5d31/attachment.pgp>


More information about the Spice-devel mailing list