vulkan-cereal: plumb AndroidPipeFlags to AndroidPipe creation

- Useful for next patch.

BUG=202552093
TEST=run Cuttlefish

Change-Id: Ia6aca323ffa39e8739ac49325cca71981ab54caa
diff --git a/host-common/AndroidPipe.cpp b/host-common/AndroidPipe.cpp
index 380bb09..8136992 100644
--- a/host-common/AndroidPipe.cpp
+++ b/host-common/AndroidPipe.cpp
@@ -246,7 +246,7 @@
             return PIPE_ERROR_INVAL;
         }
 
-        AndroidPipe* newPipe = svc->create(mHwPipe, pipeArgs);
+        AndroidPipe* newPipe = svc->create(mHwPipe, pipeArgs, mFlags);
         if (!newPipe) {
             D("%s: Initialization failed for %s pipe!", __FUNCTION__, pipeName);
             return PIPE_ERROR_INVAL;
@@ -303,7 +303,8 @@
 public:
     ConnectorService() : Service("<connector>") {}
 
-    virtual AndroidPipe* create(void* hwPipe, const char* args) override {
+    virtual AndroidPipe* create(void* hwPipe, const char* args,
+                                enum AndroidPipeFlags flags) override {
         return new ConnectorPipe(hwPipe, this);
     }
 
@@ -603,13 +604,14 @@
 void* android_pipe_guest_open(void* hwpipe) {
     CHECK_VM_STATE_LOCK();
     DD("%s: Creating new connector pipe for hwpipe=%p", __FUNCTION__, hwpipe);
-    return android::sGlobals()->connectorService.create(hwpipe, nullptr);
+    return android::sGlobals()->connectorService.create(hwpipe, nullptr, (AndroidPipeFlags)0);
 }
 
 void* android_pipe_guest_open_with_flags(void* hwpipe, uint32_t flags) {
     CHECK_VM_STATE_LOCK();
     DD("%s: Creating new connector pipe for hwpipe=%p", __FUNCTION__, hwpipe);
-    auto pipe = android::sGlobals()->connectorService.create(hwpipe, nullptr);
+    auto pipe =
+        android::sGlobals()->connectorService.create(hwpipe, nullptr, (AndroidPipeFlags)flags);
     pipe->setFlags((AndroidPipeFlags)flags);
     return pipe;
 }
diff --git a/host-common/AndroidPipe.h b/host-common/AndroidPipe.h
index de471e2..4714651 100644
--- a/host-common/AndroidPipe.h
+++ b/host-common/AndroidPipe.h
@@ -98,7 +98,8 @@
         // name (see add() below). |hwPipe| is the hardware-side
         // view of the pipe, and |args| potential arguments. Must
         // return nullptr on error.
-        virtual AndroidPipe* create(void* hwPipe, const char* args) = 0;
+        virtual AndroidPipe* create(void* hwPipe, const char* args,
+                                    enum AndroidPipeFlags flags) = 0;
 
         // Called once per whole vm save/load operation.
         virtual void preLoad(android::base::Stream* stream) {}
diff --git a/host-common/RefcountPipe.cpp b/host-common/RefcountPipe.cpp
index 8ac7537..035dcdc 100644
--- a/host-common/RefcountPipe.cpp
+++ b/host-common/RefcountPipe.cpp
@@ -87,7 +87,8 @@
 
 RefcountPipe::Service::Service() : AndroidPipe::Service("refcount") {}
 
-AndroidPipe* RefcountPipe::Service::create(void* hwPipe, const char* args) {
+AndroidPipe* RefcountPipe::Service::create(void* hwPipe, const char* args,
+                                           enum AndroidPipeFlags flags) {
     return new RefcountPipe(hwPipe, this);
 }
 
diff --git a/host-common/RefcountPipe.h b/host-common/RefcountPipe.h
index 6956bd5..28e926b 100644
--- a/host-common/RefcountPipe.h
+++ b/host-common/RefcountPipe.h
@@ -29,7 +29,7 @@
     class Service final : public AndroidPipe::Service {
     public:
         Service();
-        AndroidPipe* create(void* hwPipe, const char* args) override;
+        AndroidPipe* create(void* hwPipe, const char* args, enum AndroidPipeFlags flags) override;
         AndroidPipe* load(void* hwPipe,
                           const char* args,
                           android::base::Stream* stream) override;
diff --git a/host-common/opengl/GLProcessPipe.cpp b/host-common/opengl/GLProcessPipe.cpp
index 7948f32..7ff3298 100644
--- a/host-common/opengl/GLProcessPipe.cpp
+++ b/host-common/opengl/GLProcessPipe.cpp
@@ -64,13 +64,13 @@
 
         bool canLoad() const override { return true; }
 
-        AndroidPipe* create(void* hwPipe, const char* args) override {
-            return new GLProcessPipe(hwPipe, this);
+        AndroidPipe* create(void* hwPipe, const char* args, enum AndroidPipeFlags flags) override {
+            return new GLProcessPipe(hwPipe, this, flags);
         }
 
         AndroidPipe* load(void* hwPipe, const char* args,
                          base::Stream* stream) override {
-            return new GLProcessPipe(hwPipe, this, stream);
+            return new GLProcessPipe(hwPipe, this, (AndroidPipeFlags)0, stream);
         }
 
         void preLoad(base::Stream* stream) override {
@@ -82,7 +82,7 @@
         }
     };
 
-    GLProcessPipe(void* hwPipe, Service* service,
+    GLProcessPipe(void* hwPipe, Service* service, enum AndroidPipeFlags flags,
                   base::Stream* loadStream = nullptr)
         : AndroidPipe(hwPipe, service) {
         if (loadStream) {
diff --git a/host-common/opengl/OpenglEsPipe.cpp b/host-common/opengl/OpenglEsPipe.cpp
index 83c9c62..bc0ee72 100644
--- a/host-common/opengl/OpenglEsPipe.cpp
+++ b/host-common/opengl/OpenglEsPipe.cpp
@@ -83,7 +83,7 @@
         Service() : AndroidPipe::Service("opengles") {}
 
         // Create a new EmuglPipe instance.
-        AndroidPipe* create(void* hwPipe, const char* args) override {
+        AndroidPipe* create(void* hwPipe, const char* args, AndroidPipeFlags flags) override {
             return createPipe(hwPipe, this, args);
         }