void retainContext(uintptr_t context_id) { context_map_mutex.lock(); if (context_map.find(context_id) != context_map.end()) _retainContext(context_map[context_id]); context_map_mutex.unlock(); }
void retainContext(uintptr_t context_id) { #if APITRACE_TLS context_map_mutex.lock(); #endif if (context_map.find(context_id) != context_map.end()) _retainContext(context_map[context_id]); #if APITRACE_TLS context_map_mutex.unlock(); #endif }
void createContext(uintptr_t context_id) { // wglCreateContextAttribsARB causes internal calls to wglCreateContext to be // traced, causing context to be defined twice. if (context_map.find(context_id) != context_map.end()) { return; } context_ptr_t ctx(new Context); context_map_mutex.lock(); _retainContext(ctx); context_map[context_id] = ctx; context_map_mutex.unlock(); }