[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] Re: [PATCH 0/2] fbif: Add offset in resize event
fbfront: Add offset in resize event Also support depth change. Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx> diff -r 966c04d42e94 tools/ioemu/hw/xenfb.c --- a/tools/ioemu/hw/xenfb.c Wed Mar 26 09:12:57 2008 +0000 +++ b/tools/ioemu/hw/xenfb.c Wed Mar 26 11:05:07 2008 +0000 @@ -56,6 +56,7 @@ int depth; /* colour depth of guest framebuffer */ int width; /* pixel width of guest framebuffer */ int height; /* pixel height of guest framebuffer */ + int offset; /* offset of the framebuffer */ int abs_pointer_wanted; /* Whether guest supports absolute pointer */ int button_state; /* Last seen pointer button state */ char protocol[64]; /* frontend protocol */ @@ -519,11 +520,13 @@ case XENFB_TYPE_RESIZE: xenfb->width = event->resize.width; xenfb->height = event->resize.height; + xenfb->depth = event->resize.depth; xenfb->row_stride = event->resize.stride; + xenfb->offset = event->resize.offset; dpy_colourdepth(xenfb->ds, xenfb->depth); dpy_resize(xenfb->ds, xenfb->width, xenfb->height, xenfb->row_stride); if (xenfb->ds->shared_buf) - dpy_setdata(xenfb->ds, xenfb->pixels); + dpy_setdata(xenfb->ds, xenfb->pixels + xenfb->offset); xenfb_invalidate(xenfb); break; } @@ -1105,6 +1108,7 @@ #define BLT(SRC_T,DST_T,RSB,GSB,BSB,RDB,GDB,BDB) \ for (line = y ; line < (y+h) ; line++) { \ SRC_T *src = (SRC_T *)(xenfb->pixels \ + + xenfb->offset \ + (line * xenfb->row_stride) \ + (x * xenfb->depth / 8)); \ DST_T *dst = (DST_T *)(xenfb->ds->data \ @@ -1147,7 +1151,7 @@ if (xenfb->depth == xenfb->ds->depth) { /* Perfect match can use fast path */ for (line = y ; line < (y+h) ; line++) { memcpy(xenfb->ds->data + (line * xenfb->ds->linesize) + (x * xenfb->ds->depth / 8), - xenfb->pixels + (line * xenfb->row_stride) + (x * xenfb->depth / 8), + xenfb->pixels + xenfb->offset + (line * xenfb->row_stride) + (x * xenfb->depth / 8), w * xenfb->depth / 8); } } else { /* Mismatch requires slow pixel munging */ --- a/xen/include/public/io/fbif.h Wed Mar 26 09:12:57 2008 +0000 +++ b/xen/include/public/io/fbif.h Wed Mar 26 11:05:08 2008 +0000 @@ -63,6 +63,7 @@ int32_t height; /* height in pixels */ int32_t stride; /* stride in bytes */ int32_t depth; /* depth in bits */ + int32_t offset; /* offset of the framebuffer in bytes */ }; #define XENFB_OUT_EVENT_SIZE 40 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |