static void qemu_alloc_display(DisplaySurface *surface, int width, int height,
int linesize, PixelFormat pf, int newflags)
{
- surface->width = width;
- surface->height = height;
- surface->linesize = linesize;
surface->pf = pf;
qemu_pixman_image_unref(surface->image);
surface->image = NULL;
- surface->data = NULL;
surface->format = qemu_pixman_get_format(&pf);
assert(surface->format != 0);
NULL, linesize);
assert(surface->image != NULL);
- surface->data = (uint8_t *)pixman_image_get_data(surface->image);
surface->flags = newflags | QEMU_ALLOCATED_FLAG;
#ifdef HOST_WORDS_BIGENDIAN
surface->flags |= QEMU_BIG_ENDIAN_FLAG;
{
DisplaySurface *surface = g_new0(DisplaySurface, 1);
- surface->width = width;
- surface->height = height;
- surface->linesize = linesize;
surface->pf = qemu_default_pixelformat(bpp);
surface->format = qemu_pixman_get_format(&surface->pf);
#ifdef HOST_WORDS_BIGENDIAN
surface->flags = QEMU_BIG_ENDIAN_FLAG;
#endif
- surface->data = data;
return surface;
}
pf.rmask = 0x00FF0000;
pf.gmask = 0x0000FF00;
pf.bmask = 0x000000FF;
- pf.amax = 255;
pf.rmax = 255;
pf.gmax = 255;
pf.bmax = 255;
- pf.ashift = 24;
pf.rshift = 16;
pf.gshift = 8;
pf.bshift = 0;
pf.rbits = 8;
pf.gbits = 8;
pf.bbits = 8;
- pf.abits = 8;
break;
default:
break;