1. 25 5月, 2010 2 次提交
  2. 22 3月, 2010 1 次提交
  3. 20 3月, 2010 2 次提交
    • A
      Convert atexit users to exit_notifier · d7234f4d
      Anthony Liguori 提交于
      All of these users have global state so we really don't see a benefit from
      exit_notifier.  However, using exit_notifier means that there's one less
      justification for having global state in the first place.
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      d7234f4d
    • A
      sdl: use mouse mode notifier · 3af12c86
      Anthony Liguori 提交于
      Today we poll the mouse mode whenever there is a mouse movement.  There is a
      subtle usability problem with this though.
      
      If we're in relative mode and grab is enabled, when we change to absolute mode,
      we break grab.  This gives a user a seamless transition when the new pointer
      is enabled.
      
      But because we poll for mouse change, this grab break won't occur until the user
      attempts to move the mouse.  By using notifiers, the grab break happens as soon
      as possible.
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      3af12c86
  4. 17 3月, 2010 1 次提交
    • B
      sdl: improve error message on fatal error · b6034a39
      Bjørn Mork 提交于
      The SDL_SetVideoMode() error condition is easily triggered by a user by
      simply configure a guest with a host unsupported display resolution
      and attempting to enable fullscreen.  Since the error is fatal, adding
      a bit of debugging help can't harm.
      
      Sample output with this change:
      
       (qemu) Could not open SDL display (1280x1024x32): No video mode large enough for 1280x1024
      
      The width x height might seem redundant as SDL also provides it in
      SDL_GetError(), but I believe there are situations where it is
      useful.  I.e. if there is some other SDL error.  Anyway, redundant
      information in fatal error messages has never harmed a single gerbil.
      Signed-off-by: NBjørn Mork <bjorn@mork.no>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      b6034a39
  5. 09 3月, 2010 1 次提交
  6. 07 3月, 2010 1 次提交
  7. 20 2月, 2010 1 次提交
  8. 27 1月, 2010 1 次提交
  9. 30 12月, 2009 1 次提交
  10. 07 10月, 2009 1 次提交
  11. 02 10月, 2009 2 次提交
  12. 27 9月, 2009 1 次提交
  13. 10 9月, 2009 1 次提交
  14. 24 8月, 2009 1 次提交
    • R
      sdl.c: support 32 bpp cursors · 699960b2
      Reimar Döffinger 提交于
      Hello,
      currently when a 32 bpp cursor gets defined the result is all-black in
      the areas that are not transparent (you'll get a 32 bpp cursor if you
      use my previous patch to allow vmware_vga to use a 32 bpp framebuffer).
      This is because the switch in sdl.c lacks a 32 bpp case.
      The thing I am unsure about though is which byte is the unused one and
      should be skipped, the first or the last - for the black-and-white
      cursors I tested it doesn't make a difference...
      Signed-off-by: NReimar Döffinger <Reimar.Doeffinger@gmx.de>
      Signed-off-by: NAndrzej Zaborowski <balrogg@gmail.com>
      699960b2
  15. 11 8月, 2009 1 次提交
  16. 01 8月, 2009 1 次提交
  17. 28 7月, 2009 1 次提交
  18. 30 6月, 2009 1 次提交
  19. 29 6月, 2009 1 次提交
  20. 17 5月, 2009 1 次提交
    • M
      Only shutdown video subsytem in sdl_cleanup · d8ee7665
      malc 提交于
      Depending on the order in which atexit handlers are called SDL might
      try to join on an audio thread without said thread ever being notified
      that it must stop, hence QEMU will forever block in pthread_join call.
      Signed-off-by: Nmalc <av1474@comtv.ru>
      d8ee7665
  21. 13 4月, 2009 1 次提交
  22. 21 3月, 2009 1 次提交
  23. 13 3月, 2009 1 次提交
    • A
      DisplayAllocator interface (Stefano Stabellini) · 7b5d76da
      aliguori 提交于
      Hi all,
      this patch adds a DisplayAllocator interface that allows display
      frontends (sdl in particular) to provide a preallocated display buffer
      for the graphical backend to use.
      
      Whenever a graphical backend cannot use
      qemu_create_displaysurface_from because its own internal pixel format
      cannot be exported directly (text mode or graphical mode with color
      depth 8 or 24), it creates another display buffer in memory using
      qemu_create_displaysurface and does the conversion.
      This new buffer needs to be blitted into the sdl surface buffer every time
      we need to update portions of the screen.
      We can avoid this using the DisplayAllocator interace: sdl provides its
      own implementation of qemu_create_displaysurface, giving back the sdl
      surface buffer directly (as we used to do before the DisplayState
      changes).
      Since the buffer returned by sdl could be in bgr format we need to put
      back in the handlers of that case.
      
      This approach is good if the two following conditions are true:
      
      1) the sdl surface is a software surface that resides in main memory;
      
      2) the host display color depth is either 16 or 32 bpp.
      
      If first condition is false we can have bad performances using sdl
      and vnc together.
      If the second condition is false performances are certainly not going to
      improve but they shouldn't get worse either.
      
      The first condition is always true, at least on linux/X11 systems; but I
      believe is true also on other platforms.
      The second condition is true in the vast majority of the cases.
      
      This patch should also have the good side effect of solving the sdl
      2D slowness malc was reporting on MacOS, because SDL_BlitSurface is not
      going to be called anymore when the guest is in text mode or 24bpp.
      However the root problem is still present so I suspect we may
      still see some slowness on MacOS when the guest is in 32 or 16 bpp.
      Signed-off-by: NStefano Stabellini <stefano.stabellini@eu.citrix.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6839 c046a42c-6fe2-441c-8c8c-71466251a162
      7b5d76da
  24. 08 3月, 2009 1 次提交
  25. 07 3月, 2009 2 次提交
  26. 04 3月, 2009 1 次提交
  27. 06 2月, 2009 1 次提交
  28. 30 1月, 2009 2 次提交
  29. 21 1月, 2009 2 次提交
  30. 16 1月, 2009 3 次提交
    • A
      DisplayState interface change (Stefano Stabellini) · 7d957bd8
      aliguori 提交于
      This patch changes the DisplayState interface adding support for
      multiple frontends at the same time (sdl and vnc) and implements most
      of the benefit of the shared_buf patch without the added complexity.
      
      Currently DisplayState is managed by sdl (or vnc) and sdl (or vnc) is
      also responsible for allocating the data and setting the depth.
      Vga.c (or another backend) will do any necessary conversion.
      
      The idea is to change it so that is vga.c (or another backend) together
      with console.c that fully manage the DisplayState interface allocating
      data and setting the depth (either 16 or 32 bit, if the guest uses a
      different resolution or is in text mode, vga.c (or another backend) is
      in charge of doing the conversion seamlessly).
      
      The other idea is that DisplayState supports *multiple* frontends
      like sdl and vnc; each of them can register some callbacks to be called
      when a display event occurs.
      
      The interesting changes are:
      
      - the new structures and related functions in console.h and console.c
      
      in particular the following functions are very helpful to manage a
      DisplaySurface:
      
      qemu_create_displaysurface
      qemu_resize_displaysurface
      qemu_create_displaysurface_from
      qemu_free_displaysurface
      
      - console_select and qemu_console_resize in console.c
      this two functions manage multiple consoles on a single host display
      
      - moving code around in hw/vga.c
      as for the shared_buf patch this is necessary to be able to handle a dynamic
      DisplaySurface bpp
      
      - changes to vga_draw_graphic in hw/vga.c
      this is the place where the DisplaySurface buffer is shared with the
      videoram, when possible;
      
      
      Compared to the last version the only changes are:
      
      - do not remove support to dpy_copy in cirrus_vga
      - change the name of the displaysurface handling functions
      Signed-off-by: NStefano Stabellini <stefano.stabellini@eu.citrix.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      
      
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6336 c046a42c-6fe2-441c-8c8c-71466251a162
      7d957bd8
    • A
      remove bgr (Stefano Stabellini) · 8927bcfd
      aliguori 提交于
      Do not handle bgr host displays in the backends.
      
      Right now a bgr flag exists so that sdl can set it, if the SDL_Surface
      is bgr.
      Afterwards the graphic device (e.g. vga.c) does the needed conversion.
      
      With this patch series is sdl that is responsible for rendering the format
      provided by the graphic device that must provide a DisplaySurface
      (ds->surface) in 16 or 32 bpp, rgb.
      Afterwards sdl creates a SDL_Surface from the given DisplaySurface and
      blits it into the main SDL_Surface using SDL_BlitSurface.
      
      Everything is handled by sdl transparently, because SDL_BlitSurface is
      perfectly capable of handling bgr displays by itself.
      Signed-off-by: NStefano Stabellini <stefano.stabellini@eu.citrix.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      
      
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6335 c046a42c-6fe2-441c-8c8c-71466251a162
      8927bcfd
    • A
      Handle SDL grabs failing (Mark McLoughlin) · 6bb81603
      aliguori 提交于
      If a X window is not viewable, XGrabPointer() fails and
      returns GrabNotViewable. SDL's X backend currently handles
      this by retrying the grab until the window becomes viewable
      again.
      
      This means e.g. if you Ctrl-Alt-RightArrow to switch
      workspaces, QEMU tries to grab, SDL blocks because the
      window isn't viewable and your guest stops executing until
      you switch back to that workspace again.
      
      See this Fedora bug for the gory details:
      
        https://bugzilla.redhat.com/480065
      
      Some SDL backends will return SDL_GRAB_OFF from
      SDL_WM_GrabInput(), so the fix is to make the X backend do
      this if the grab fails.
      
      The only side-effect in QEMU is that if SDL_WM_GrabInput()
      fails we still change the window title to indicate that it's
      grabbed, when in fact it's not. This patch fixes that minor
      issue.
      Signed-off-by: NMark McLoughlin <markmc@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      
      
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6325 c046a42c-6fe2-441c-8c8c-71466251a162
      6bb81603
  31. 22 8月, 2008 2 次提交