From: Lyude Paul <lyude@redhat.com>
To: Paul Kocialkowski <paul.kocialkowski@linux.intel.com>,
intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH i-g-t] lib/igt_chamelium: Create pixman image with bytes per pixel, not bits
Date: Fri, 16 Jun 2017 14:58:19 -0400 [thread overview]
Message-ID: <1497639499.18958.5.camel@redhat.com> (raw)
In-Reply-To: <20170616141902.16369-1-paul.kocialkowski@linux.intel.com>
RB'd and pushed, thanks!
On Fri, 2017-06-16 at 17:19 +0300, Paul Kocialkowski wrote:
> The pixman_image_create_bits function expects bytes per pixels as
> fifth
> argument, not bits per pixels.
>
> This divides the PIXMAN_FORMAT_BPP macro's result by 8 to get it in
> bytes per pixels instead of bits per pixels.
>
> Signed-off-by: Paul Kocialkowski <paul.kocialkowski@linux.intel.com>
> ---
> lib/igt_chamelium.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/igt_chamelium.c b/lib/igt_chamelium.c
> index 2315ce60..4a2af796 100644
> --- a/lib/igt_chamelium.c
> +++ b/lib/igt_chamelium.c
> @@ -967,7 +967,7 @@ static pixman_image_t
> *convert_frame_format(pixman_image_t *src,
> int w = pixman_image_get_width(src), h =
> pixman_image_get_height(src);
>
> converted = pixman_image_create_bits(format, w, h, NULL,
> - PIXMAN_FORMAT_BPP(forma
> t) * w);
> + PIXMAN_FORMAT_BPP(forma
> t) / 8 * w);
> pixman_image_composite(PIXMAN_OP_ADD, src, NULL, converted,
> 0, 0, 0, 0, 0, 0, w, h);
>
--
Cheers,
Lyude
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
prev parent reply other threads:[~2017-06-16 18:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-16 14:19 [PATCH i-g-t] lib/igt_chamelium: Create pixman image with bytes per pixel, not bits Paul Kocialkowski
2017-06-16 18:58 ` Lyude Paul [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1497639499.18958.5.camel@redhat.com \
--to=lyude@redhat.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=paul.kocialkowski@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox