diff options
author | Jesse Hall <jessehall@google.com> | 2012-07-11 16:25:37 -0700 |
---|---|---|
committer | Jesse Hall <jessehall@google.com> | 2012-07-11 16:45:58 -0700 |
commit | dca7f2a6ac56567850e0e03a063e1739e43c5ce2 (patch) | |
tree | db0b5bd48d23a9bd1e03c23f1995802222516775 /emulator/opengl/host/include/libOpenglRender | |
parent | 310777dae93bc4e402ec8a807ce3151271d1038b (diff) | |
download | sdk-dca7f2a6ac56567850e0e03a063e1739e43c5ce2.zip sdk-dca7f2a6ac56567850e0e03a063e1739e43c5ce2.tar.gz sdk-dca7f2a6ac56567850e0e03a063e1739e43c5ce2.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: I6af2eac0c7f27670a3b6595772eebc7aa2b24688
Diffstat (limited to 'emulator/opengl/host/include/libOpenglRender')
-rw-r--r-- | emulator/opengl/host/include/libOpenglRender/render_api.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/emulator/opengl/host/include/libOpenglRender/render_api.h b/emulator/opengl/host/include/libOpenglRender/render_api.h index 4fe54f4..527aba1 100644 --- a/emulator/opengl/host/include/libOpenglRender/render_api.h +++ b/emulator/opengl/host/include/libOpenglRender/render_api.h @@ -59,14 +59,21 @@ DECL(int, initLibrary, (void)); DECL(int, setStreamMode, (int mode)); /* initOpenGLRenderer - initialize the OpenGL renderer process. - * portNum is the tcp port number the renderer is listening to. - * width and height are the framebuffer dimensions that will be - * reported to the guest display driver. + * + * width and height are the framebuffer dimensions that will be reported to the + * guest display driver. + * + * addr is a buffer of addrLen bytes that will receive the address that clients + * should connect to. The interpretation depends on the transport: + * - TCP: The buffer contains the port number as a string. The server is + * listening only on the loopback address. + * - Win32 and UNIX named pipes: The buffer contains the full path clients + * should connect to. * * This function is *NOT* thread safe and should be called first * to initialize the renderer after initLibrary(). */ -DECL(int, initOpenGLRenderer, (int width, int height, int portNum)); +DECL(int, initOpenGLRenderer, (int width, int height, char* addr, size_t addrLen)); /* getHardwareStrings - describe the GPU hardware and driver. * The underlying GL's vendor/renderer/version strings are returned to the |