From: Samuel Thibault <samuel.thibault@eu.citrix.com>
To: Xen-devel@lists.xensource.com
Subject: [PATCH] stubdom: simplify xenfb resize handler
Date: Mon, 9 Jun 2008 11:19:28 +0100 [thread overview]
Message-ID: <20080609101928.GE4264@implementation.uk.xensource.com> (raw)
stubdom: simplify xenfb resize handler
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
diff -r e0a68a9e1636 tools/ioemu/hw/xenfb.c
--- a/tools/ioemu/hw/xenfb.c Mon Jun 09 10:13:49 2008 +0100
+++ b/tools/ioemu/hw/xenfb.c Mon Jun 09 11:21:15 2008 +0100
@@ -1353,8 +1353,6 @@ static char *kbd_path, *fb_path;
static unsigned char linux2scancode[KEY_MAX + 1];
-static void xenfb_pv_colourdepth(DisplayState *ds, int depth);
-
int xenfb_connect_vkbd(const char *path)
{
kbd_path = strdup(path);
@@ -1381,10 +1379,17 @@ static void xenfb_pv_resize_shared(Displ
XenFBState *xs = ds->opaque;
struct fbfront_dev *fb_dev = xs->fb_dev;
int offset;
- fprintf(stderr,"resize to %dx%d, %d required\n", w, h, linesize);
- xenfb_pv_colourdepth(ds, depth);
+
+ fprintf(stderr,"resize to %dx%d@%d, %d required\n", w, h, depth, linesize);
ds->width = w;
ds->height = h;
+ if (!depth) {
+ ds->shared_buf = 0;
+ ds->depth = 32;
+ } else {
+ ds->shared_buf = 1;
+ ds->depth = depth;
+ }
if (!linesize)
ds->shared_buf = 0;
if (!ds->shared_buf)
@@ -1405,31 +1410,6 @@ static void xenfb_pv_resize(DisplayState
static void xenfb_pv_resize(DisplayState *ds, int w, int h)
{
xenfb_pv_resize_shared(ds, w, h, 0, 0, NULL);
-}
-
-static void xenfb_pv_colourdepth(DisplayState *ds, int depth)
-{
- XenFBState *xs = ds->opaque;
- struct fbfront_dev *fb_dev = xs->fb_dev;
- static int lastdepth = -1;
- if (!depth) {
- ds->shared_buf = 0;
- ds->depth = 32;
- } else {
- ds->shared_buf = 1;
- ds->depth = depth;
- }
- if (depth != lastdepth) {
- fprintf(stderr,"redepth to %d required\n", depth);
- lastdepth = depth;
- } else return;
- if (!fb_dev)
- return;
- if (ds->shared_buf) {
- ds->data = NULL;
- } else {
- ds->data = xs->nonshared_vram;
- }
}
static void xenfb_pv_setdata(DisplayState *ds, void *pixels)
reply other threads:[~2008-06-09 10:19 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20080609101928.GE4264@implementation.uk.xensource.com \
--to=samuel.thibault@eu.citrix.com \
--cc=Xen-devel@lists.xensource.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 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.