Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/usermode Add RFB type flag to indicate what kind of...
details: https://anonhg.NetBSD.org/src/rev/68d094b5ddc1
branches: trunk
changeset: 772335:68d094b5ddc1
user: reinoud <reinoud%NetBSD.org@localhost>
date: Fri Dec 30 11:32:57 2011 +0000
description:
Add RFB type flag to indicate what kind of request is waiting
diffstat:
sys/arch/usermode/include/thunk.h | 12 ++++++++++--
sys/arch/usermode/usermode/thunk.c | 11 ++++++++---
2 files changed, 18 insertions(+), 5 deletions(-)
diffs (97 lines):
diff -r 53adde5f0a81 -r 68d094b5ddc1 sys/arch/usermode/include/thunk.h
--- a/sys/arch/usermode/include/thunk.h Fri Dec 30 11:06:18 2011 +0000
+++ b/sys/arch/usermode/include/thunk.h Fri Dec 30 11:32:57 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: thunk.h,v 1.48 2011/12/30 09:36:01 jmcneill Exp $ */
+/* $NetBSD: thunk.h,v 1.49 2011/12/30 11:32:57 reinoud Exp $ */
/*-
* Copyright (c) 2011 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -190,9 +190,15 @@
} data;
} thunk_rfb_event_t;
+
typedef struct {
+ uint8_t type;
uint16_t x, y, w, h;
+ uint32_t colour; /* for RRE clear */
} thunk_rfb_update_t;
+#define THUNK_RFB_TYPE_UPDATE 0
+#define THUNK_RFB_TYPE_COPYRECT 1
+#define THUNK_RFB_TYPE_RRE 2 /* rectangle fill */
#define THUNK_RFB_QUEUELEN 128
@@ -208,8 +214,10 @@
uint8_t depth;
char name[64];
uint8_t *framebuf;
+
+ unsigned int nupdates;
+ unsigned int first_mergable;
thunk_rfb_update_t update[THUNK_RFB_QUEUELEN];
- unsigned int nupdates;
} thunk_rfb_t;
int thunk_rfb_open(thunk_rfb_t *, uint16_t);
diff -r 53adde5f0a81 -r 68d094b5ddc1 sys/arch/usermode/usermode/thunk.c
--- a/sys/arch/usermode/usermode/thunk.c Fri Dec 30 11:06:18 2011 +0000
+++ b/sys/arch/usermode/usermode/thunk.c Fri Dec 30 11:32:57 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: thunk.c,v 1.60 2011/12/30 11:06:18 jmcneill Exp $ */
+/* $NetBSD: thunk.c,v 1.61 2011/12/30 11:32:57 reinoud Exp $ */
/*-
* Copyright (c) 2011 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -28,7 +28,7 @@
#include <sys/cdefs.h>
#ifdef __NetBSD__
-__RCSID("$NetBSD: thunk.c,v 1.60 2011/12/30 11:06:18 jmcneill Exp $");
+__RCSID("$NetBSD: thunk.c,v 1.61 2011/12/30 11:32:57 reinoud Exp $");
#endif
#include <sys/types.h>
@@ -76,6 +76,8 @@
#define MAP_ANON MAP_ANONYMOUS
#endif
+#define RFB_DEBUG
+
extern int boothowto;
void
@@ -1051,6 +1053,7 @@
}
rfb->nupdates = 0;
+ rfb->first_mergable = 0;
return;
@@ -1118,6 +1121,7 @@
}
rfb->nupdates = 0;
+ rfb->first_mergable = 0;
thunk_rfb_update(rfb, 0, 0, rfb->width, rfb->height);
}
@@ -1191,7 +1195,7 @@
return;
/* no sense in queueing duplicate updates */
- for (n = 0; n < rfb->nupdates; n++) {
+ for (n = rfb->first_mergable; n < rfb->nupdates; n++) {
if (rfb->update[n].x == x && rfb->update[n].y == y &&
rfb->update[n].w == w && rfb->update[n].h == h)
return;
@@ -1204,6 +1208,7 @@
/* add the update request to the queue */
update = &rfb->update[rfb->nupdates++];
+ update->type = THUNK_RFB_TYPE_UPDATE;
update->x = x;
update->y = y;
update->w = w;
Home |
Main Index |
Thread Index |
Old Index