]> git.cworth.org Git - apitrace/blobdiff - wrappers/gltrace_state.cpp
glxtrace: Always use GL_RGBA for glXBindTexImageEXT.
[apitrace] / wrappers / gltrace_state.cpp
index 023d09e3e32d5bcd859a199349caf488ffe9249c..60eada60d49e4014def29e518526ba79a9cfe994 100644 (file)
@@ -57,15 +57,13 @@ public:
     }
 };
 
-static os::thread_specific_ptr<struct ThreadState> thread_state;
+static OS_THREAD_SPECIFIC_PTR(ThreadState) thread_state;
 
 static ThreadState *get_ts(void)
 {
-    ThreadState *ts = thread_state.get();
-
+    ThreadState *ts = thread_state;
     if (!ts) {
-        ts = new ThreadState;
-        thread_state.reset(ts);
+        thread_state = ts = new ThreadState;
     }
 
     return ts;
@@ -96,7 +94,7 @@ static bool _releaseContext(context_ptr_t ctx)
  */
 bool releaseContext(uintptr_t context_id)
 {
-    bool res;
+    bool res = false;
 
     context_map_mutex.lock();
     /*