aboutsummaryrefslogtreecommitdiffstats
path: root/android/opengles.h
diff options
context:
space:
mode:
authorJesse Hall <jessehall@google.com>2012-07-11 16:48:28 -0700
committerJesse Hall <jessehall@google.com>2012-07-11 16:48:28 -0700
commit055adab0b70c70890634649a27c12b2c25afcaca (patch)
tree4338811f487cd81e377017016e3a1779bcd3a7e6 /android/opengles.h
parenta593847491224cfab9eb94b1e36c85333dc081da (diff)
downloadexternal_qemu-055adab0b70c70890634649a27c12b2c25afcaca.zip
external_qemu-055adab0b70c70890634649a27c12b2c25afcaca.tar.gz
external_qemu-055adab0b70c70890634649a27c12b2c25afcaca.tar.bz2
Use a per-process server address for the GLES server
Previously we used a hardcoded address (tcp port, unix pipe path, etc.) for the OpenGLRender system. Multiple emulators would all try to listen on the same address, with the system non-deterministically (?) choosing which one accepted each new connection. This resulted in frames going to the wrong emulator window, one emulator shutting down another's OpenGL system, etc. Now the OpenGLRender server requests an unused tcp port or derives a path from the pid, and reports the address back to the emulator client to use for future connections from the guest. Change-Id: I139d32615200b36b87f2d2ede4abb4060ec02776
Diffstat (limited to 'android/opengles.h')
-rw-r--r--android/opengles.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/android/opengles.h b/android/opengles.h
index aac6249..6330287 100644
--- a/android/opengles.h
+++ b/android/opengles.h
@@ -14,8 +14,6 @@
#include <stddef.h>
-#define ANDROID_OPENGLES_BASE_PORT 22468
-
/* Call this function to initialize the hardware opengles emulation.
* This function will abort if we can't find the corresponding host
* libraries through dlopen() or equivalent.
@@ -59,8 +57,10 @@ void android_stopOpenglesRenderer(void);
*/
extern int android_gles_fast_pipes;
-/* Write the path of the Unix socket we're going to use to access GLES on a given <port> */
-/* The result is only valid on Unix systems */
-void android_gles_unix_path(char* buff, size_t buffsize, int port);
+/* Get the address of the socket that clients should connect to to access GLES.
+ * For TCP this is just the port number (as a string) on the loopback address.
+ * For UNIX and Win32 pipes it is the full pathname of the pipe.
+ */
+void android_gles_server_path(char* buff, size_t buffsize);
#endif /* ANDROID_OPENGLES_H */