Exemplo n.º 1
0
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();
}
Exemplo n.º 2
0
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
}
Exemplo n.º 3
0
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();
}