mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 18:23:57 -06:00
Merge remote-tracking branch 'kraxel/pixman.v11' into staging
# By Gerd Hoffmann (22) and Igor Mitsyanko (2) # Via Gerd Hoffmann * kraxel/pixman.v11: (24 commits) qxl: register QemuConsole for secondary cards gtk: custom cursor support console: allow pinning displaychangelisteners to consoles console: add qemu_console_is_* xen: re-enable refresh interval reporting for xenfb console: gui timer fixes console: add GraphicHwOps console: make DisplayState private to console.c console: move gui_update+gui_setup_refresh from vl.c into console.c console: zap g_width + g_height console: simplify screendump console: give each QemuConsole its own DisplaySurface console: rename vga_hw_*, add QemuConsole param console: displaystate init revamp console: add trace events console: switch color_table_rgb to pixman_color_t console: use pixman for font rendering console: use pixman for fill+blit pixman: render vgafont glyphs into pixman images pixman: add qemu_pixman_color() ... Message-id: 1366105178-26744-1-git-send-email-kraxel@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
commit
100c533220
37 changed files with 836 additions and 1078 deletions
|
@ -21,7 +21,8 @@
|
|||
#define QEMU_CAPS_LOCK_LED (1 << 2)
|
||||
|
||||
/* in ms */
|
||||
#define GUI_REFRESH_INTERVAL 30
|
||||
#define GUI_REFRESH_INTERVAL_DEFAULT 30
|
||||
#define GUI_REFRESH_INTERVAL_IDLE 3000
|
||||
|
||||
typedef void QEMUPutKBDEvent(void *opaque, int keycode);
|
||||
typedef void QEMUPutLEDEvent(void *opaque, int ledstate);
|
||||
|
@ -174,27 +175,15 @@ typedef struct DisplayChangeListenerOps {
|
|||
} DisplayChangeListenerOps;
|
||||
|
||||
struct DisplayChangeListener {
|
||||
int idle;
|
||||
uint64_t gui_timer_interval;
|
||||
uint64_t update_interval;
|
||||
const DisplayChangeListenerOps *ops;
|
||||
DisplayState *ds;
|
||||
QemuConsole *con;
|
||||
|
||||
QLIST_ENTRY(DisplayChangeListener) next;
|
||||
};
|
||||
|
||||
struct DisplayState {
|
||||
struct DisplaySurface *surface;
|
||||
struct QEMUTimer *gui_timer;
|
||||
bool have_gfx;
|
||||
bool have_text;
|
||||
|
||||
QLIST_HEAD(, DisplayChangeListener) listeners;
|
||||
|
||||
struct DisplayState *next;
|
||||
};
|
||||
|
||||
void register_displaystate(DisplayState *ds);
|
||||
DisplayState *get_displaystate(void);
|
||||
DisplayState *init_displaystate(void);
|
||||
DisplaySurface* qemu_create_displaysurface_from(int width, int height, int bpp,
|
||||
int linesize, uint8_t *data,
|
||||
bool byteswap);
|
||||
|
@ -217,16 +206,15 @@ static inline int is_buffer_shared(DisplaySurface *surface)
|
|||
return !(surface->flags & QEMU_ALLOCATED_FLAG);
|
||||
}
|
||||
|
||||
void gui_setup_refresh(DisplayState *ds);
|
||||
|
||||
void register_displaychangelistener(DisplayState *ds,
|
||||
DisplayChangeListener *dcl);
|
||||
void update_displaychangelistener(DisplayChangeListener *dcl,
|
||||
uint64_t interval);
|
||||
void unregister_displaychangelistener(DisplayChangeListener *dcl);
|
||||
|
||||
void dpy_gfx_update(QemuConsole *con, int x, int y, int w, int h);
|
||||
void dpy_gfx_replace_surface(QemuConsole *con,
|
||||
DisplaySurface *surface);
|
||||
void dpy_refresh(DisplayState *s);
|
||||
void dpy_gfx_copy(QemuConsole *con, int src_x, int src_y,
|
||||
int dst_x, int dst_y, int w, int h);
|
||||
void dpy_text_cursor(QemuConsole *con, int x, int y);
|
||||
|
@ -281,24 +269,25 @@ static inline void console_write_ch(console_ch_t *dest, uint32_t ch)
|
|||
*dest = ch;
|
||||
}
|
||||
|
||||
typedef void (*vga_hw_update_ptr)(void *);
|
||||
typedef void (*vga_hw_invalidate_ptr)(void *);
|
||||
typedef void (*vga_hw_screen_dump_ptr)(void *, const char *, bool cswitch,
|
||||
Error **errp);
|
||||
typedef void (*vga_hw_text_update_ptr)(void *, console_ch_t *);
|
||||
typedef struct GraphicHwOps {
|
||||
void (*invalidate)(void *opaque);
|
||||
void (*gfx_update)(void *opaque);
|
||||
void (*text_update)(void *opaque, console_ch_t *text);
|
||||
void (*update_interval)(void *opaque, uint64_t interval);
|
||||
} GraphicHwOps;
|
||||
|
||||
QemuConsole *graphic_console_init(vga_hw_update_ptr update,
|
||||
vga_hw_invalidate_ptr invalidate,
|
||||
vga_hw_screen_dump_ptr screen_dump,
|
||||
vga_hw_text_update_ptr text_update,
|
||||
QemuConsole *graphic_console_init(const GraphicHwOps *ops,
|
||||
void *opaque);
|
||||
|
||||
void vga_hw_update(void);
|
||||
void vga_hw_invalidate(void);
|
||||
void vga_hw_text_update(console_ch_t *chardata);
|
||||
void graphic_hw_update(QemuConsole *con);
|
||||
void graphic_hw_invalidate(QemuConsole *con);
|
||||
void graphic_hw_text_update(QemuConsole *con, console_ch_t *chardata);
|
||||
|
||||
QemuConsole *qemu_console_lookup_by_index(unsigned int index);
|
||||
bool qemu_console_is_visible(QemuConsole *con);
|
||||
bool qemu_console_is_graphic(QemuConsole *con);
|
||||
bool qemu_console_is_fixedsize(QemuConsole *con);
|
||||
|
||||
int is_graphic_console(void);
|
||||
int is_fixedsize_console(void);
|
||||
void text_consoles_set_display(DisplayState *ds);
|
||||
void console_select(unsigned int index);
|
||||
void console_color_init(DisplayState *ds);
|
||||
|
|
|
@ -43,4 +43,13 @@ pixman_image_t *qemu_pixman_mirror_create(pixman_format_code_t format,
|
|||
pixman_image_t *image);
|
||||
void qemu_pixman_image_unref(pixman_image_t *image);
|
||||
|
||||
pixman_color_t qemu_pixman_color(PixelFormat *pf, uint32_t color);
|
||||
pixman_image_t *qemu_pixman_glyph_from_vgafont(int height, const uint8_t *font,
|
||||
unsigned int ch);
|
||||
void qemu_pixman_glyph_render(pixman_image_t *glyph,
|
||||
pixman_image_t *surface,
|
||||
pixman_color_t *fgcol,
|
||||
pixman_color_t *bgcol,
|
||||
int x, int y, int cw, int ch);
|
||||
|
||||
#endif /* QEMU_PIXMAN_H */
|
||||
|
|
|
@ -71,7 +71,6 @@ typedef struct SimpleSpiceDisplay SimpleSpiceDisplay;
|
|||
typedef struct SimpleSpiceUpdate SimpleSpiceUpdate;
|
||||
|
||||
struct SimpleSpiceDisplay {
|
||||
QemuConsole *con;
|
||||
DisplaySurface *ds;
|
||||
DisplayChangeListener dcl;
|
||||
void *buf;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue