From bdfb71562ca221832e5a01d272d8f187af3f39cb Mon Sep 17 00:00:00 2001 From: Guy Zadickario Date: Sun, 14 Aug 2011 13:08:43 +0300 Subject: [PATCH] opengles emulator: call XInitThreads in emulator_test_renderer Now that we are not running the renderer as a seperate process we need to have the XInitThreads call we put in the renderer process inside emulator_test_renderer since the render server runs inside that thread. NOTE FOR INTEGRATION: this will need to be added to the emulator as well. Change-Id: I70592ad976d08c86e2c9e75b11b6ad57d6067606 --- .../opengl/tests/emulator_test_renderer/main.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tools/emulator/opengl/tests/emulator_test_renderer/main.cpp b/tools/emulator/opengl/tests/emulator_test_renderer/main.cpp index 525c5eb7e..06abce776 100644 --- a/tools/emulator/opengl/tests/emulator_test_renderer/main.cpp +++ b/tools/emulator/opengl/tests/emulator_test_renderer/main.cpp @@ -23,7 +23,11 @@ static int convert_keysym(int sym); // forward +#ifdef __linux__ +#include +#endif #ifdef _WIN32 + #include int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd) #else @@ -45,6 +49,14 @@ int main(int argc, char *argv[]) winHeight = height; } +#ifdef __linux__ + // some OpenGL implementations may call X functions + // it is safer to synchronize all X calls made by all the + // rendering threads. (although the calls we do are locked + // in the FrameBuffer singleton object). + XInitThreads(); +#endif + // // Inialize SDL window //