mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
ioemu: SDL rendering using OpenGL
Add opengl support for rendering the guest framebuffer in the SDL window. SDL is needed anyway to open the window and handle the events. Opengl rendering is optional and can be turned off at both compile time and in the vm configuration file. Some of the benefits of using opengl are: - faster rendering, less CPU intensive, especially with good graphic cards; - makes the window resizing possible and hardware accelerated, thus very efficient and smooth; - allows other optimizations like sharing directly a buffer in vram with the guest (not yet implemented). Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
This commit is contained in:
1 parent
985bf498a5
commit
1fa1369d8a
8 files changed
+216
-14
No files matched your search
@@ -142,6 +142,7 @@ XENAPI_PLATFORM_CFG_TYPES = {
|
||||
'rtc_timeoffset': int,
|
||||
'serial': str,
|
||||
'sdl': int,
|
||||
'opengl': int,
|
||||
'soundhw': str,
|
||||
'stdvga': int,
|
||||
'usb': int,
|
||||
|
||||
@@ -263,7 +263,8 @@ class ImageHandler:
|
||||
|
||||
elif has_sdl:
|
||||
# SDL is default in QEMU.
|
||||
pass
|
||||
if int(vmConfig['platform'].get('opengl', 1)) != 1 :
|
||||
ret.append('-disable-opengl')
|
||||
else:
|
||||
ret.append('-nographic')
|
||||
|
||||
|
||||
@@ -504,6 +504,10 @@ gopts.var('sdl', val='',
|
||||
fn=set_value, default=None,
|
||||
use="""Should the device model use SDL?""")
|
||||
|
||||
gopts.var('opengl', val='',
|
||||
fn=set_value, default=None,
|
||||
use="""Enable\Disable OpenGL""")
|
||||
|
||||
gopts.var('display', val='DISPLAY',
|
||||
fn=set_value, default=None,
|
||||
use="X11 display to use")
|
||||
@@ -745,7 +749,7 @@ def configure_hvm(config_image, vals):
|
||||
'vnc', 'vncdisplay', 'vncunused', 'vncconsole', 'vnclisten',
|
||||
'sdl', 'display', 'xauthority', 'rtc_timeoffset', 'monitor',
|
||||
'acpi', 'apic', 'usb', 'usbdevice', 'keymap', 'pci', 'hpet',
|
||||
'guest_os_type', 'hap']
|
||||
'guest_os_type', 'hap', 'opengl']
|
||||
|
||||
for a in args:
|
||||
if a in vals.__dict__ and vals.__dict__[a] is not None:
|
||||
|
||||