console: displaystate init revamp

We have only one DisplayState, so there is no need for the "next"
linking, rip it.  Also consolidate all displaystate initialization
into init_displaystate().  This function is called by vl.c after
creating the devices (and thus all QemuConsoles) and before
initializing DisplayChangeListensers (aka gtk/sdl/vnc/spice ui).

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
Gerd Hoffmann 2013-03-07 17:08:29 +01:00
parent 437fe1061b
commit 64840c66b7
3 changed files with 39 additions and 51 deletions

View file

@ -189,12 +189,9 @@ struct DisplayState {
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);