diff options
Diffstat (limited to 'host-common')
-rw-r--r-- | host-common/AndroidPipe.cpp | 10 | ||||
-rw-r--r-- | host-common/AndroidPipe.h | 3 | ||||
-rw-r--r-- | host-common/RefcountPipe.cpp | 3 | ||||
-rw-r--r-- | host-common/RefcountPipe.h | 2 | ||||
-rw-r--r-- | host-common/opengl/GLProcessPipe.cpp | 8 | ||||
-rw-r--r-- | host-common/opengl/OpenglEsPipe.cpp | 2 |
6 files changed, 16 insertions, 12 deletions
diff --git a/host-common/AndroidPipe.cpp b/host-common/AndroidPipe.cpp index 380bb096..8136992a 100644 --- a/host-common/AndroidPipe.cpp +++ b/host-common/AndroidPipe.cpp @@ -246,7 +246,7 @@ public: 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 @@ class ConnectorService : public Service { 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_reset_services() { 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 de471e23..47146512 100644 --- a/host-common/AndroidPipe.h +++ b/host-common/AndroidPipe.h @@ -98,7 +98,8 @@ public: // 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 8ac7537c..035dcdcc 100644 --- a/host-common/RefcountPipe.cpp +++ b/host-common/RefcountPipe.cpp @@ -87,7 +87,8 @@ void registerRefcountPipeService() { 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 6956bd58..28e926b9 100644 --- a/host-common/RefcountPipe.h +++ b/host-common/RefcountPipe.h @@ -29,7 +29,7 @@ public: 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 7948f327..7ff32983 100644 --- a/host-common/opengl/GLProcessPipe.cpp +++ b/host-common/opengl/GLProcessPipe.cpp @@ -64,13 +64,13 @@ public: 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 @@ public: } }; - 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 83c9c626..bc0ee72d 100644 --- a/host-common/opengl/OpenglEsPipe.cpp +++ b/host-common/opengl/OpenglEsPipe.cpp @@ -83,7 +83,7 @@ public: 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); } |