Lines Matching refs:ds

45 void original_qemu_console_resize(DisplayState *ds, int width, int height);
152 DisplayState *ds;
237 static unsigned int vga_get_color(DisplayState *ds, unsigned int rgba)
241 switch(ds_get_bits_per_pixel(ds)) {
272 void vga_fill_rect(DisplayState *ds, int posx, int posy,
278 bpp = (ds_get_bits_per_pixel(ds) + 7) >> 3;
279 d1 = ds_get_data(ds) +
280 ds_get_linesize(ds) * posy + bpp * posx;
303 d1 += ds_get_linesize(ds);
308 static void vga_bitblt(DisplayState *ds, int xs, int ys, int xd, int yd, int w, int h)
314 bpp = (ds_get_bits_per_pixel(ds) + 7) >> 3;
317 s = ds_get_data(ds) +
318 ds_get_linesize(ds) * ys + bpp * xs;
319 d = ds_get_data(ds) +
320 ds_get_linesize(ds) * yd + bpp * xd;
323 d += ds_get_linesize(ds);
324 s += ds_get_linesize(ds);
327 s = ds_get_data(ds) +
328 ds_get_linesize(ds) * (ys + h - 1) + bpp * xs;
329 d = ds_get_data(ds) +
330 ds_get_linesize(ds) * (yd + h - 1) + bpp * xd;
333 d -= ds_get_linesize(ds);
334 s -= ds_get_linesize(ds);
422 static inline unsigned int col_expand(DisplayState *ds, unsigned int col)
424 switch(ds_get_bits_per_pixel(ds)) {
472 static void vga_putcharxy(DisplayState *ds, int x, int y, int ch,
494 bpp = (ds_get_bits_per_pixel(ds) + 7) >> 3;
495 d = ds_get_data(ds) +
496 ds_get_linesize(ds) * y * FONT_HEIGHT + bpp * x * FONT_WIDTH;
497 linesize = ds_get_linesize(ds);
500 switch(ds_get_bits_per_pixel(ds)) {
606 if (!ds_get_bits_per_pixel(s->ds)) {
617 vga_putcharxy(s->ds, x, y2, c->ch,
632 if (!ds_get_bits_per_pixel(s->ds)) {
649 vga_putcharxy(s->ds, x, y, c->ch, &t_attrib);
651 vga_putcharxy(s->ds, x, y, c->ch, &(c->t_attrib));
665 if (!ds_get_bits_per_pixel(s->ds)) {
674 vga_fill_rect(s->ds, 0, 0, ds_get_width(s->ds), ds_get_height(s->ds),
680 vga_putcharxy(s->ds, x, y, c->ch,
688 dpy_update(s->ds, 0, 0, ds_get_width(s->ds), ds_get_height(s->ds));
750 if (!ds_get_bits_per_pixel(s->ds)) {
758 vga_bitblt(s->ds, 0, FONT_HEIGHT, 0, 0,
761 vga_fill_rect(s->ds, 0, (s->height - 1) * FONT_HEIGHT,
1107 active_console->g_width = ds_get_width(active_console->ds);
1108 active_console->g_height = ds_get_height(active_console->ds);
1112 DisplayState *ds = s->ds;
1114 if (ds_get_bits_per_pixel(s->ds)) {
1115 ds->surface = qemu_resize_displaysurface(ds, s->g_width, s->g_height);
1117 s->ds->surface->width = s->width;
1118 s->ds->surface->height = s->height;
1120 dpy_resize(s->ds);
1139 if (ds_get_bits_per_pixel(s->ds) && s->update_x0 < s->update_x1) {
1140 dpy_update(s->ds, s->update_x0, s->update_y0,
1243 if (!ds_get_bits_per_pixel(s->ds) && s->console_type == TEXT_CONSOLE) {
1244 s->g_width = ds_get_width(s->ds);
1245 s->g_height = ds_get_height(s->ds);
1265 dpy_update(s->ds, s->text_x[0], s->text_y[0],
1273 dpy_cursor(s->ds, s->x, s->y);
1278 static QEMUConsole *get_graphic_console(DisplayState *ds)
1284 if (s->console_type == GRAPHIC_CONSOLE && s->ds == ds)
1290 static QEMUConsole *new_console(DisplayState *ds, console_type_t console_type)
1302 s->ds = ds;
1393 DisplayState *ds = g_malloc0(sizeof(DisplayState));
1394 ds->allocator = &default_allocator;
1395 ds->surface = qemu_create_displaysurface(ds, 640, 480);
1396 register_displaystate(ds);
1402 void register_displaystate(DisplayState *ds)
1408 ds->next = NULL;
1409 *s = ds;
1420 DisplayAllocator *register_displayallocator(DisplayState *ds, DisplayAllocator *da)
1422 if(ds->allocator == &default_allocator) {
1424 surf = da->create_displaysurface(ds_get_width(ds), ds_get_height(ds));
1425 defaultallocator_free_displaysurface(ds->surface);
1426 ds->surface = surf;
1427 ds->allocator = da;
1429 return ds->allocator;
1439 DisplayState *ds;
1441 ds = (DisplayState *) g_malloc0(sizeof(DisplayState));
1442 ds->allocator = &default_allocator;
1444 ds->surface = qemu_create_displaysurface(ds, android_display_width, android_display_height);
1446 ds->surface = qemu_create_displaysurface(ds, 640, 480);
1449 s = new_console(ds, GRAPHIC_CONSOLE);
1451 qemu_free_displaysurface(ds);
1452 g_free(ds);
1461 register_displaystate(ds);
1462 return ds;
1475 void console_color_init(DisplayState *ds)
1480 color_table[j][i] = col_expand(ds,
1481 vga_get_color(ds, color_table_rgb[j][i]));
1496 static void text_console_do_init(CharDriverState *chr, DisplayState *ds)
1509 s->ds = ds;
1513 console_color_init(s->ds);
1521 s->g_width = ds_get_width(s->ds);
1522 s->g_height = ds_get_height(s->ds);
1631 void text_consoles_set_display(DisplayState *ds)
1636 text_console_do_init(text_consoles[i], ds);
1642 void qemu_console_resize(DisplayState *ds, int width, int height)
1644 QEMUConsole *s = get_graphic_console(ds);
1650 ds->surface = qemu_resize_displaysurface(ds, width, height);
1651 dpy_resize(ds);
1655 void qemu_console_copy(DisplayState *ds, int src_x, int src_y,
1659 dpy_copy(ds, src_x, src_y, dst_x, dst_y, w, h);
1792 unregister_displayupdatelistener(DisplayState *ds, DisplayUpdateListener *dul)
1794 DisplayUpdateListener **pnode = &ds->update_listeners;
1808 android_display_reset(DisplayState* ds, int width, int height, int bitspp)
1814 qemu_free_displaysurface(ds);
1829 ds->surface = surface;