From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PATCH 5/5] console: clip update rectangle
Date: Fri, 14 Dec 2012 08:54:25 +0100 [thread overview]
Message-ID: <1355471665-23903-6-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1355471665-23903-1-git-send-email-kraxel@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
console.h | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/console.h b/console.h
index 50a0512..edb1950 100644
--- a/console.h
+++ b/console.h
@@ -229,6 +229,16 @@ static inline void unregister_displaychangelistener(DisplayState *ds,
static inline void dpy_gfx_update(DisplayState *s, int x, int y, int w, int h)
{
struct DisplayChangeListener *dcl;
+ int width = pixman_image_get_width(s->surface->image);
+ int height = pixman_image_get_height(s->surface->image);
+
+ x = MAX(x, 0);
+ y = MAX(y, 0);
+ x = MIN(x, width);
+ y = MIN(y, height);
+ w = MIN(w, width - x);
+ h = MIN(h, height - y);
+
QLIST_FOREACH(dcl, &s->listeners, next) {
if (dcl->dpy_gfx_update) {
dcl->dpy_gfx_update(s, x, y, w, h);
--
1.7.1
next prev parent reply other threads:[~2012-12-14 7:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-14 7:54 [Qemu-devel] [PATCH 0/5] pixman patch queue Gerd Hoffmann
2012-12-14 7:54 ` [Qemu-devel] [PATCH 1/5] pixman: fix version check for PIXMAN_TYPE_BGRA Gerd Hoffmann
2012-12-14 7:54 ` [Qemu-devel] [PATCH 2/5] Revert "pixman: require 0.18.4 or newer" Gerd Hoffmann
2012-12-14 7:54 ` [Qemu-devel] [PATCH 3/5] pixman: update internal copy to pixman-0.28.2 Gerd Hoffmann
2012-12-14 7:54 ` [Qemu-devel] [PATCH 4/5] pixman: fix vnc tight png/jpeg support Gerd Hoffmann
2012-12-14 7:54 ` Gerd Hoffmann [this message]
2012-12-14 17:31 ` [Qemu-devel] [PATCH 0/5] pixman patch queue Stefan Weil
2012-12-15 9:04 ` Blue Swirl
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=1355471665-23903-6-git-send-email-kraxel@redhat.com \
--to=kraxel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).