goldfish-opengl: plumb capset_id to creation of virtio-gpu device

The introduction of virtio-gpu context types allows for separation
and composition of previously mixed functionality.  For example,
one may compose with Ranchu and run virgl (crazy example, but it's
theoretically possible) for GL.

BUG=b:202552093
TEST=compile

Change-Id: If6f2a09475d4a4de99b2645a79f88654e35c4523
diff --git a/system/OpenglSystemCommon/HostConnection.h b/system/OpenglSystemCommon/HostConnection.h
index a6810a5..0b3ce1e 100644
--- a/system/OpenglSystemCommon/HostConnection.h
+++ b/system/OpenglSystemCommon/HostConnection.h
@@ -155,16 +155,26 @@
 
 struct EGLThreadInfo;
 
+// Rutabaga capsets.
+#define VIRTIO_GPU_CAPSET_NONE 0
+#define VIRTIO_GPU_CAPSET_VIRGL 1
+#define VIRTIO_GPU_CAPSET_VIRGL2 2
+#define VIRTIO_GPU_CAPSET_GFXSTREAM 3
+#define VIRTIO_GPU_CAPSET_VENUS 4
+#define VIRTIO_GPU_CAPSET_CROSS_DOMAIN 5
 
 class HostConnection
 {
 public:
     static HostConnection *get();
-    static HostConnection *getWithThreadInfo(EGLThreadInfo* tInfo);
+    static HostConnection *getOrCreate(uint32_t capset_id);
+
+    static HostConnection *getWithThreadInfo(EGLThreadInfo* tInfo,
+                                             uint32_t capset_id = VIRTIO_GPU_CAPSET_NONE);
     static void exit();
     static void exitUnclean(); // for testing purposes
 
-    static std::unique_ptr<HostConnection> createUnique();
+    static std::unique_ptr<HostConnection> createUnique(uint32_t capset_id = VIRTIO_GPU_CAPSET_NONE);
     HostConnection(const HostConnection&) = delete;
 
     ~HostConnection();
@@ -213,7 +223,7 @@
 private:
     // If the connection failed, |conn| is deleted.
     // Returns NULL if connection failed.
-    static std::unique_ptr<HostConnection> connect();
+    static std::unique_ptr<HostConnection> connect(uint32_t capset_id);
 
     HostConnection();
     static gl_client_context_t  *s_getGLContext();