[gnome-boxes/virgl-opt-in: 2/2] Revert "vm-configurator: Enable virtio-gpu and virgil to new VMs"



commit 0f317a8725ea828ddcdd0334e9eb9083e2fe2859
Author: Felipe Borges <felipeborges gnome org>
Date:   Mon May 27 16:10:21 2019 +0200

    Revert "vm-configurator: Enable virtio-gpu and virgil to new VMs"
    
    This reverts commit a50b713e6a3f984e66cad10369ff9779407edac1.
    
    Lets make the 3D Acceleration an opt-in feature. This means that
    newly created VMs are going to have 3D acceleration DISABLED and
    it can be ENABLED in the VMs Properties.
    
    Fixes #362

 src/vm-configurator.vala | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)
---
diff --git a/src/vm-configurator.vala b/src/vm-configurator.vala
index d844aafe..9d2567e9 100644
--- a/src/vm-configurator.vala
+++ b/src/vm-configurator.vala
@@ -83,7 +83,7 @@ public static Domain create_domain_config (InstallerMedia install_media, string
         install_media.setup_domain_config (domain);
 
         set_video_config (domain, install_media);
-        var graphics = create_graphics_device (install_media.supports_virtio_gpu);
+        var graphics = create_graphics_device ();
         domain.add_device (graphics);
 
         // SPICE agent channel. This is needed for features like copy&paste between host and guest etc to 
work.
@@ -103,6 +103,7 @@ public static Domain create_domain_config (InstallerMedia install_media, string
         add_smartcard_support (domain);
 #endif
 
+        set_video_config (domain, install_media);
         set_sound_config (domain, install_media);
         set_tablet_config (domain, install_media);
         set_mouse_config (domain, install_media);
@@ -264,18 +265,12 @@ public static async void update_existing_domain (Domain          domain,
         GLib.List<GVirConfig.DomainDevice> devices = null;
         DomainInterface iface = null;
         DomainGraphicsSpice graphics = null;
-        bool accel3d = false;
         DomainChannel channel_webdav = null;
         foreach (var device in domain.get_devices ()) {
             if (device is DomainInterface)
                 iface = device as DomainInterface;
             else if (device is DomainGraphicsSpice)
                 graphics = device as DomainGraphicsSpice;
-            else if (device is DomainVideo) {
-                var model = (device as DomainVideo).get_model ();
-                accel3d = (model == DomainVideoModel.VIRTIO);
-                devices.prepend (device);
-            }
             else if (device is DomainChannel) {
                 var device_channel = device as DomainChannel;
                 if (device_channel.get_target_name () == WEBDAV_CHANNEL_URI)
@@ -299,7 +294,7 @@ else if (device is DomainChannel) {
         }
 
         if (graphics != null)
-            devices.prepend (create_graphics_device (accel3d));
+            devices.prepend (create_graphics_device ());
         if (channel_webdav == null)
             devices.prepend (create_webdav_channel ());
 
@@ -375,7 +370,6 @@ private static void set_video_config (Domain domain, InstallerMedia install_medi
 
         if (install_media.supports_virtio_gpu) {
             video.set_model (DomainVideoModel.VIRTIO);
-            video.set_accel3d (true);
         }
 
         domain.add_device (video);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]