xf86-video-intel: 2 commits - tools/virtual.c
Chris Wilson
ickle at kemper.freedesktop.org
Fri Nov 8 04:47:07 PST 2013
tools/virtual.c | 39 ++++++++++++++++++++++++++-------------
1 file changed, 26 insertions(+), 13 deletions(-)
New commits:
commit e0075ccee2e7bbe46ecbf717817d468cc9248cc4
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Fri Nov 8 12:46:08 2013 +0000
intel-virtual-output: Check for pending events before skipping draw
Make sure we check if the destination display has caught up before
skipping a frame.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/tools/virtual.c b/tools/virtual.c
index 226f86d..71d18f5 100644
--- a/tools/virtual.c
+++ b/tools/virtual.c
@@ -260,6 +260,8 @@ can_use_shm(Display *dpy,
if (codes) {
XShmCompletionEvent e;
+ memset(&e, 0, sizeof(e));
+
e.type = codes->first_event;
e.send_event = 1;
e.serial = 1;
@@ -1353,8 +1355,13 @@ static int clone_paint(struct clone *c)
DBG(("%s-%s is damaged, last SHM serial: %ld, now %ld\n",
DisplayString(c->dst.dpy), c->dst.name,
(long)c->dst.serial, (long)LastKnownRequestProcessed(c->dst.dpy)));
- if (c->dst.serial > LastKnownRequestProcessed(c->dst.dpy))
- return EAGAIN;
+ if (c->dst.serial > LastKnownRequestProcessed(c->dst.dpy)) {
+ while (XPending(c->dst.dpy))
+ ;
+
+ if (c->dst.serial > LastKnownRequestProcessed(c->dst.dpy))
+ return EAGAIN;
+ }
if (FORCE_FULL_REDRAW) {
c->damaged.x1 = c->src.x;
@@ -2326,14 +2333,12 @@ static void display_flush_send(struct display *display)
return;
}
+ memset(&e, 0, sizeof(e));
e.type = display->shm_event;
e.send_event = 1;
- e.serial = 0;
e.drawable = display->root;
e.major_code = display->shm_opcode;
e.minor_code = X_ShmPutImage;
- e.shmseg = 0;
- e.offset = 0;
XSendEvent(display->dpy, display->root, False, 0, (XEvent *)&e);
display_mark_flush(display);
commit ea4f99c333b181eb21012b5bee60251695e93c8b
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Fri Nov 8 12:30:21 2013 +0000
intel-virtual-output: Add some DBG for bad_visual()
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/tools/virtual.c b/tools/virtual.c
index 160d6a1..226f86d 100644
--- a/tools/virtual.c
+++ b/tools/virtual.c
@@ -1456,15 +1456,23 @@ static int record_mouse(struct context *ctx)
static int bad_visual(Visual *visual, int depth)
{
+ DBG(("%s? depth=%d, visual: bits_per_rgb=%d, red_mask=%08x, green_mask=%08x, blue_mask=%08\n",
+ __func__, depth,
+ visual->bits_per_rgb,
+ visual->red_mask,
+ visual->green_mask,
+ visual->blue_mask));
switch (depth) {
- case 16: return (visual->bits_per_rgb != 6 ||
- visual->red_mask != 0x1f << 11 ||
- visual->green_mask != 0x3f << 5 ||
- visual->blue_mask != 0x1f << 0);
- case 24: return (visual->bits_per_rgb != 8 ||
- visual->red_mask != 0xff << 16 ||
- visual->green_mask != 0xff << 8 ||
- visual->blue_mask != 0xff << 0);
+ case 16: return (visual->bits_per_rgb != 6 ||
+ visual->red_mask != 0x1f << 11 ||
+ visual->green_mask != 0x3f << 5 ||
+ visual->blue_mask != 0x1f << 0);
+
+ case 24: return (visual->bits_per_rgb != 8 ||
+ visual->red_mask != 0xff << 16 ||
+ visual->green_mask != 0xff << 8 ||
+ visual->blue_mask != 0xff << 0);
+
default: return 0;
}
}
More information about the xorg-commit
mailing list