From: Gerd Hoffmann <kraxel@redhat.com>
To: Alon Levy <alevy@redhat.com>
Cc: qemu-devel@nongnu.org, elmarco@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2 1/2] qxl: introduce QXLCookie
Date: Fri, 17 Feb 2012 14:11:40 +0100 [thread overview]
Message-ID: <4F3E520C.8030907@redhat.com> (raw)
In-Reply-To: <1329468300-6507-1-git-send-email-alevy@redhat.com>
On 02/17/12 09:44, Alon Levy wrote:
> Will be used in the next patch.
>
> Signed-off-by: Alon Levy <alevy@redhat.com>
> ---
> hw/qxl-render.c | 2 +-
> hw/qxl.c | 60 +++++++++++++++++++++++++++++++++++++--------------
> hw/qxl.h | 2 +-
> ui/spice-display.c | 26 ++++++++++++++++++++--
> ui/spice-display.h | 12 ++++++++++
> 5 files changed, 80 insertions(+), 22 deletions(-)
>
> diff --git a/hw/qxl-render.c b/hw/qxl-render.c
> index 133d093..b238b96 100644
> --- a/hw/qxl-render.c
> +++ b/hw/qxl-render.c
> @@ -133,7 +133,7 @@ void qxl_render_update(PCIQXLDevice *qxl)
>
> memset(dirty, 0, sizeof(dirty));
> qxl_spice_update_area(qxl, 0, &update,
> - dirty, ARRAY_SIZE(dirty), 1, QXL_SYNC);
> + dirty, ARRAY_SIZE(dirty), 1, QXL_SYNC, NULL);
> if (redraw) {
> memset(dirty, 0, sizeof(dirty));
> dirty[0] = update;
> diff --git a/hw/qxl.c b/hw/qxl.c
> index ac69125..02708e3 100644
> --- a/hw/qxl.c
> +++ b/hw/qxl.c
> @@ -143,15 +143,20 @@ void qxl_spice_update_area(PCIQXLDevice *qxl, uint32_t surface_id,
> struct QXLRect *area, struct QXLRect *dirty_rects,
> uint32_t num_dirty_rects,
> uint32_t clear_dirty_region,
> - qxl_async_io async)
> + qxl_async_io async, QXLCookie *cookie)
> {
> if (async == QXL_SYNC) {
> qxl->ssd.worker->update_area(qxl->ssd.worker, surface_id, area,
> dirty_rects, num_dirty_rects, clear_dirty_region);
> } else {
> #if SPICE_INTERFACE_QXL_MINOR >= 1
> + if (cookie == NULL) {
> + cookie = qxl_cookie_new(QXL_COOKIE_TYPE_IO,
> + QXL_IO_UPDATE_AREA_ASYNC,
> + 0);
> + }
Hmm, why that? If the callers want a cookie, then they should
explicitly pass in what they want instead of expecting the function to
magically do the correct thing. If the callers don't need a cookie,
then use something like QXL_COOKIE_TYPE_UNUSED or simply pass on the
NULL pointer.
cheers,
Gerd
next prev parent reply other threads:[~2012-02-17 13:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-16 23:11 [Qemu-devel] [PATCH 1/2] qxl: introduce QXLCookie Alon Levy
2012-02-16 23:11 ` [Qemu-devel] [PATCH 2/2] qxl: make qxl_render_update async Alon Levy
2012-02-17 8:39 ` [Qemu-devel] [PATCH 1/2] qxl: introduce QXLCookie Alon Levy
2012-02-17 8:44 ` [Qemu-devel] [PATCH v2 " Alon Levy
2012-02-17 8:45 ` [Qemu-devel] [PATCH v2 2/2] qxl: make qxl_render_update async Alon Levy
2012-02-17 12:49 ` [Qemu-devel] [PATCH v2 1/2] qxl: introduce QXLCookie Marc-André Lureau
2012-02-17 19:09 ` Alon Levy
2012-02-17 19:21 ` Alon Levy
2012-02-17 12:54 ` Marc-André Lureau
2012-02-17 13:11 ` Gerd Hoffmann [this message]
2012-02-17 15:16 ` Alon Levy
2012-02-17 13:20 ` Alon Levy
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=4F3E520C.8030907@redhat.com \
--to=kraxel@redhat.com \
--cc=alevy@redhat.com \
--cc=elmarco@redhat.com \
--cc=qemu-devel@nongnu.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.