您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ wined3d_mutex_unlock函数代码示例

51自学网 2021-06-03 09:58:50
  C++
这篇教程C++ wined3d_mutex_unlock函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中wined3d_mutex_unlock函数的典型用法代码示例。如果您正苦于以下问题:C++ wined3d_mutex_unlock函数的具体用法?C++ wined3d_mutex_unlock怎么用?C++ wined3d_mutex_unlock使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了wined3d_mutex_unlock函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: d3d9_surface_GetDC

static HRESULT WINAPI d3d9_surface_GetDC(IDirect3DSurface9 *iface, HDC *dc){    struct d3d9_surface *surface = impl_from_IDirect3DSurface9(iface);    HRESULT hr;    TRACE("iface %p, dc %p./n", iface, dc);    if (!surface->getdc_supported)    {        WARN("Surface does not support GetDC, returning D3DERR_INVALIDCALL/n");        /* Don't touch the DC */        return D3DERR_INVALIDCALL;    }    wined3d_mutex_lock();    hr = wined3d_surface_getdc(surface->wined3d_surface, dc);    wined3d_mutex_unlock();    return hr;}
开发者ID:PatroxGaurab,项目名称:wine,代码行数:20,


示例2: d3d11_query_Release

static ULONG STDMETHODCALLTYPE d3d11_query_Release(ID3D11Query *iface){    struct d3d_query *query = impl_from_ID3D11Query(iface);    ULONG refcount = InterlockedDecrement(&query->refcount);    TRACE("%p decreasing refcount to %u./n", query, refcount);    if (!refcount)    {        ID3D11Device *device = query->device;        wined3d_mutex_lock();        wined3d_query_decref(query->wined3d_query);        wined3d_mutex_unlock();        ID3D11Device_Release(device);    }    return refcount;}
开发者ID:AndreRH,项目名称:wine,代码行数:20,


示例3: d3d9_texture_3d_Release

static ULONG WINAPI d3d9_texture_3d_Release(IDirect3DVolumeTexture9 *iface){    struct d3d9_texture *texture = impl_from_IDirect3DVolumeTexture9(iface);    ULONG ref = InterlockedDecrement(&texture->resource.refcount);    TRACE("%p decreasing refcount to %u./n", iface, ref);    if (!ref)    {        IDirect3DDevice9Ex *parent_device = texture->parent_device;        wined3d_mutex_lock();        wined3d_texture_decref(texture->wined3d_texture);        wined3d_mutex_unlock();        /* Release the device last, as it may cause the device to be destroyed. */        IDirect3DDevice9Ex_Release(parent_device);    }    return ref;}
开发者ID:Eltechs,项目名称:wine,代码行数:20,


示例4: d3d_material3_GetMaterial

/***************************************************************************** * IDirect3DMaterial3::GetMaterial * * Returns the material assigned to this interface * * Params: *  Mat: Pointer to a D3DMATERIAL structure to store the material description * * Returns: *  D3D_OK on success *  DDERR_INVALIDPARAMS if Mat is NULL * *****************************************************************************/static HRESULT WINAPI d3d_material3_GetMaterial(IDirect3DMaterial3 *iface, D3DMATERIAL *mat){    struct d3d_material *material = impl_from_IDirect3DMaterial3(iface);    DWORD dwSize;    TRACE("iface %p, mat %p./n", iface, mat);    if (TRACE_ON(ddraw))    {        TRACE("  Returning material : ");        dump_material(&material->mat);    }    /* Copies the material structure */    wined3d_mutex_lock();    dwSize = mat->dwSize;    memcpy(mat, &material->mat, dwSize);    wined3d_mutex_unlock();    return DD_OK;}
开发者ID:Barrell,项目名称:wine,代码行数:33,


示例5: IDirect3DVolumeTexture9Impl_LockBox

static HRESULT WINAPI IDirect3DVolumeTexture9Impl_LockBox(IDirect3DVolumeTexture9 *iface,        UINT level, D3DLOCKED_BOX *locked_box, const D3DBOX *box, DWORD flags){    IDirect3DVolumeTexture9Impl *texture = (IDirect3DVolumeTexture9Impl *)iface;    struct wined3d_resource *sub_resource;    HRESULT hr;    TRACE("iface %p, level %u, locked_box %p, box %p, flags %#x./n",            iface, level, locked_box, box, flags);    wined3d_mutex_lock();    if (!(sub_resource = IWineD3DBaseTexture_GetSubResource(texture->wined3d_texture, level)))        hr = D3DERR_INVALIDCALL;    else        hr = IDirect3DVolume9_LockBox((IDirect3DVolume9 *)wined3d_resource_get_parent(sub_resource),                locked_box, box, flags);    wined3d_mutex_unlock();    return hr;}
开发者ID:dvdhoo,项目名称:wine,代码行数:20,


示例6: d3d9_vertexbuffer_GetDesc

static HRESULT WINAPI d3d9_vertexbuffer_GetDesc(IDirect3DVertexBuffer9 *iface, D3DVERTEXBUFFER_DESC *desc){    IDirect3DVertexBuffer9Impl *buffer = (IDirect3DVertexBuffer9Impl *)iface;    WINED3DBUFFER_DESC wined3d_desc;    TRACE("iface %p, desc %p./n", iface, desc);    wined3d_mutex_lock();    IWineD3DBuffer_GetDesc(buffer->wineD3DVertexBuffer, &wined3d_desc);    wined3d_mutex_unlock();    desc->Format = D3DFMT_VERTEXDATA;    desc->Usage = wined3d_desc.Usage;    desc->Pool = wined3d_desc.Pool;    desc->Size = wined3d_desc.Size;    desc->Type = D3DRTYPE_VERTEXBUFFER;    desc->FVF = buffer->fvf;    return D3D_OK;}
开发者ID:wesgarner,项目名称:wine,代码行数:20,


示例7: d3d8_CheckDeviceMultiSampleType

static HRESULT WINAPI d3d8_CheckDeviceMultiSampleType(IDirect3D8 *iface, UINT adapter, D3DDEVTYPE device_type,        D3DFORMAT format, BOOL windowed, D3DMULTISAMPLE_TYPE multisample_type){    struct d3d8 *d3d8 = impl_from_IDirect3D8(iface);    HRESULT hr;    TRACE("iface %p, adapter %u, device_type %#x, format %#x, windowed %#x, multisample_type %#x./n",            iface, adapter, device_type, format, windowed, multisample_type);    if (multisample_type > D3DMULTISAMPLE_16_SAMPLES)        return D3DERR_INVALIDCALL;    wined3d_mutex_lock();    hr = wined3d_check_device_multisample_type(d3d8->wined3d, adapter, device_type,            wined3dformat_from_d3dformat(format), windowed,            (enum wined3d_multisample_type)multisample_type, NULL);    wined3d_mutex_unlock();    return hr;}
开发者ID:Crobin83,项目名称:wine,代码行数:20,


示例8: d3d8_GetAdapterMonitor

static HMONITOR WINAPI d3d8_GetAdapterMonitor(IDirect3D8 *iface, UINT adapter){    struct d3d8 *d3d8 = impl_from_IDirect3D8(iface);    struct wined3d_output_desc desc;    HRESULT hr;    TRACE("iface %p, adapter %u./n", iface, adapter);    wined3d_mutex_lock();    hr = wined3d_get_output_desc(d3d8->wined3d, adapter, &desc);    wined3d_mutex_unlock();    if (FAILED(hr))    {        WARN("Failed to get output desc, hr %#x./n", hr);        return NULL;    }    return desc.monitor;}
开发者ID:Crobin83,项目名称:wine,代码行数:20,


示例9: d3d11_blend_state_Release

static ULONG STDMETHODCALLTYPE d3d11_blend_state_Release(ID3D11BlendState *iface){    struct d3d_blend_state *state = impl_from_ID3D11BlendState(iface);    ULONG refcount = InterlockedDecrement(&state->refcount);    TRACE("%p decreasing refcount to %u./n", state, refcount);    if (!refcount)    {        struct d3d_device *device = impl_from_ID3D11Device(state->device);        wined3d_mutex_lock();        wine_rb_remove(&device->blend_states, &state->desc);        ID3D11Device_Release(state->device);        wined3d_private_store_cleanup(&state->private_store);        wined3d_mutex_unlock();        HeapFree(GetProcessHeap(), 0, state);    }    return refcount;}
开发者ID:AlexSteel,项目名称:wine,代码行数:20,


示例10: d3d8_swapchain_Release

static ULONG WINAPI d3d8_swapchain_Release(IDirect3DSwapChain8 *iface){    struct d3d8_swapchain *swapchain = impl_from_IDirect3DSwapChain8(iface);    ULONG ref = InterlockedDecrement(&swapchain->refcount);    TRACE("%p decreasing refcount to %u./n", iface, ref);    if (!ref)    {        IDirect3DDevice8 *parent_device = swapchain->parent_device;        wined3d_mutex_lock();        wined3d_swapchain_decref(swapchain->wined3d_swapchain);        wined3d_mutex_unlock();        if (parent_device)            IDirect3DDevice8_Release(parent_device);    }    return ref;}
开发者ID:boldwine-dev,项目名称:wine1.5.23-carboncopy,代码行数:20,


示例11: d3d9_GetAdapterLUID

static HRESULT WINAPI d3d9_GetAdapterLUID(IDirect3D9Ex *iface, UINT adapter, LUID *luid){    struct d3d9 *d3d9 = impl_from_IDirect3D9Ex(iface);    struct wined3d_adapter_identifier adapter_id;    HRESULT hr;    TRACE("iface %p, adapter %u, luid %p./n", iface, adapter, luid);    adapter_id.driver_size = 0;    adapter_id.description_size = 0;    adapter_id.device_name_size = 0;    wined3d_mutex_lock();    hr = wined3d_get_adapter_identifier(d3d9->wined3d, adapter, 0, &adapter_id);    wined3d_mutex_unlock();    memcpy(luid, &adapter_id.adapter_luid, sizeof(*luid));    return hr;}
开发者ID:MortenRoenne,项目名称:wine,代码行数:20,


示例12: d3d9_CheckDeviceType

static HRESULT WINAPI d3d9_CheckDeviceType(IDirect3D9Ex *iface, UINT adapter, D3DDEVTYPE device_type,        D3DFORMAT display_format, D3DFORMAT backbuffer_format, BOOL windowed){    struct d3d9 *d3d9 = impl_from_IDirect3D9Ex(iface);    HRESULT hr;    TRACE("iface %p, adapter %u, device_type %#x, display_format %#x, backbuffer_format %#x, windowed %#x./n",            iface, adapter, device_type, display_format, backbuffer_format, windowed);    /* Others than that not supported by d3d9, but reported by wined3d for ddraw. Filter them out. */    if (!windowed && display_format != D3DFMT_X8R8G8B8 && display_format != D3DFMT_R5G6B5)        return WINED3DERR_NOTAVAILABLE;    wined3d_mutex_lock();    hr = wined3d_check_device_type(d3d9->wined3d, adapter, device_type, wined3dformat_from_d3dformat(display_format),            wined3dformat_from_d3dformat(backbuffer_format), windowed);    wined3d_mutex_unlock();    return hr;}
开发者ID:GYGit,项目名称:reactos,代码行数:20,


示例13: IDirect3DCubeTexture8Impl_Release

static ULONG WINAPI IDirect3DCubeTexture8Impl_Release(LPDIRECT3DCUBETEXTURE8 iface) {    IDirect3DCubeTexture8Impl *This = (IDirect3DCubeTexture8Impl *)iface;    ULONG ref = InterlockedDecrement(&This->ref);    TRACE("%p decreasing refcount to %u./n", iface, ref);    if (ref == 0) {        IDirect3DDevice8 *parentDevice = This->parentDevice;        TRACE("Releasing child %p/n", This->wineD3DCubeTexture);        wined3d_mutex_lock();        IWineD3DCubeTexture_Release(This->wineD3DCubeTexture);        wined3d_mutex_unlock();        /* Release the device last, as it may cause the device to be destroyed. */        IDirect3DDevice8_Release(parentDevice);    }    return ref;}
开发者ID:CandyYao,项目名称:VirtualBox-OSE,代码行数:20,


示例14: dxgi_get_private_data

HRESULT dxgi_get_private_data(struct wined3d_private_store *store,        REFGUID guid, UINT *data_size, void *data){    const struct wined3d_private_data *stored_data;    DWORD size_in;    HRESULT hr;    if (!data_size)        return E_INVALIDARG;    wined3d_mutex_lock();    if (!(stored_data = wined3d_private_store_get_private_data(store, guid)))    {        hr = DXGI_ERROR_NOT_FOUND;        *data_size = 0;        goto done;    }    size_in = *data_size;    *data_size = stored_data->size;    if (!data)    {        hr = S_OK;        goto done;    }    if (size_in < stored_data->size)    {        hr = DXGI_ERROR_MORE_DATA;        goto done;    }    if (stored_data->flags & WINED3DSPD_IUNKNOWN)        IUnknown_AddRef(stored_data->content.object);    memcpy(data, stored_data->content.data, stored_data->size);    hr = S_OK;done:    wined3d_mutex_unlock();    return hr;}
开发者ID:karolherbst,项目名称:wine,代码行数:41,


示例15: dxgi_device_Release

static ULONG STDMETHODCALLTYPE dxgi_device_Release(IWineDXGIDevice *iface){    struct dxgi_device *This = impl_from_IWineDXGIDevice(iface);    ULONG refcount = InterlockedDecrement(&This->refcount);    TRACE("%p decreasing refcount to %u/n", This, refcount);    if (!refcount)    {        if (This->child_layer) IUnknown_Release(This->child_layer);        wined3d_mutex_lock();        wined3d_device_uninit_3d(This->wined3d_device);        wined3d_device_decref(This->wined3d_device);        wined3d_mutex_unlock();        IDXGIFactory1_Release(This->factory);        wined3d_private_store_cleanup(&This->private_store);        HeapFree(GetProcessHeap(), 0, This);    }    return refcount;}
开发者ID:polarina,项目名称:wine,代码行数:21,


示例16: d3d9_vertexshader_Release

static ULONG WINAPI d3d9_vertexshader_Release(IDirect3DVertexShader9 *iface){    IDirect3DVertexShader9Impl *shader = impl_from_IDirect3DVertexShader9(iface);    ULONG refcount = InterlockedDecrement(&shader->ref);    TRACE("%p decreasing refcount to %u./n", iface, refcount);    if (!refcount)    {        IDirect3DDevice9Ex *device = shader->parentDevice;        wined3d_mutex_lock();        wined3d_shader_decref(shader->wined3d_shader);        wined3d_mutex_unlock();        /* Release the device last, as it may cause the device to be destroyed. */        IDirect3DDevice9Ex_Release(device);    }    return refcount;}
开发者ID:Sunmonds,项目名称:wine,代码行数:21,


示例17: IDirect3DSurface9Impl_GetDesc

static HRESULT WINAPI IDirect3DSurface9Impl_GetDesc(LPDIRECT3DSURFACE9 iface, D3DSURFACE_DESC* pDesc) {    IDirect3DSurface9Impl *This = (IDirect3DSurface9Impl *)iface;    WINED3DSURFACE_DESC wined3ddesc;    TRACE("iface %p, desc %p./n", iface, pDesc);    wined3d_mutex_lock();    IWineD3DSurface_GetDesc(This->wineD3DSurface, &wined3ddesc);    wined3d_mutex_unlock();    pDesc->Format = d3dformat_from_wined3dformat(wined3ddesc.format);    pDesc->Type = wined3ddesc.resource_type;    pDesc->Usage = wined3ddesc.usage;    pDesc->Pool = wined3ddesc.pool;    pDesc->MultiSampleType = wined3ddesc.multisample_type;    pDesc->MultiSampleQuality = wined3ddesc.multisample_quality;    pDesc->Width = wined3ddesc.width;    pDesc->Height = wined3ddesc.height;    return D3D_OK;}
开发者ID:austin987,项目名称:wine,代码行数:21,


示例18: IDirect3DIndexBuffer9Impl_GetDesc

static HRESULT  WINAPI        IDirect3DIndexBuffer9Impl_GetDesc(LPDIRECT3DINDEXBUFFER9 iface, D3DINDEXBUFFER_DESC *pDesc) {    IDirect3DIndexBuffer9Impl *This = (IDirect3DIndexBuffer9Impl *)iface;    HRESULT hr;    WINED3DBUFFER_DESC desc;    TRACE("iface %p, desc %p./n", iface, pDesc);    wined3d_mutex_lock();    hr = IWineD3DBuffer_GetDesc(This->wineD3DIndexBuffer, &desc);    wined3d_mutex_unlock();    if (SUCCEEDED(hr)) {        pDesc->Format = d3dformat_from_wined3dformat(This->format);        pDesc->Usage = desc.Usage;        pDesc->Pool = desc.Pool;        pDesc->Size = desc.Size;        pDesc->Type = D3DRTYPE_INDEXBUFFER;    }    return hr;}
开发者ID:CandyYao,项目名称:VirtualBox-OSE,代码行数:21,


示例19: d3d8_texture_2d_UnlockRect

static HRESULT WINAPI d3d8_texture_2d_UnlockRect(IDirect3DTexture8 *iface, UINT level){    struct d3d8_texture *texture = impl_from_IDirect3DTexture8(iface);    struct wined3d_resource *sub_resource;    struct d3d8_surface *surface_impl;    HRESULT hr;    TRACE("iface %p, level %u./n", iface, level);    wined3d_mutex_lock();    if (!(sub_resource = wined3d_texture_get_sub_resource(texture->wined3d_texture, level)))        hr = D3DERR_INVALIDCALL;    else    {        surface_impl = wined3d_resource_get_parent(sub_resource);        hr = IDirect3DSurface8_UnlockRect(&surface_impl->IDirect3DSurface8_iface);    }    wined3d_mutex_unlock();    return hr;}
开发者ID:Fredz66,项目名称:wine,代码行数:21,


示例20: d3d9_indexbuffer_GetDesc

static HRESULT WINAPI d3d9_indexbuffer_GetDesc(IDirect3DIndexBuffer9 *iface, D3DINDEXBUFFER_DESC *desc){    struct d3d9_indexbuffer *buffer = impl_from_IDirect3DIndexBuffer9(iface);    struct wined3d_resource_desc wined3d_desc;    struct wined3d_resource *wined3d_resource;    TRACE("iface %p, desc %p./n", iface, desc);    wined3d_mutex_lock();    wined3d_resource = wined3d_buffer_get_resource(buffer->wined3d_buffer);    wined3d_resource_get_desc(wined3d_resource, &wined3d_desc);    wined3d_mutex_unlock();    desc->Format = d3dformat_from_wined3dformat(buffer->format);    desc->Type = D3DRTYPE_INDEXBUFFER;    desc->Usage = buffer->usage;    desc->Pool = d3dpool_from_wined3daccess(wined3d_desc.access, wined3d_desc.usage);    desc->Size = wined3d_desc.size;    return D3D_OK;}
开发者ID:wine-mirror,项目名称:wine,代码行数:21,


示例21: d3d11_buffer_Release

static ULONG STDMETHODCALLTYPE d3d11_buffer_Release(ID3D11Buffer *iface){    struct d3d_buffer *buffer = impl_from_ID3D11Buffer(iface);    ULONG refcount = InterlockedDecrement(&buffer->refcount);    TRACE("%p decreasing refcount to %u./n", buffer, refcount);    if (!refcount)    {        ID3D11Device2 *device = buffer->device;        wined3d_mutex_lock();        wined3d_buffer_decref(buffer->wined3d_buffer);        wined3d_mutex_unlock();        /* Release the device last, it may cause the wined3d device to be         * destroyed. */        ID3D11Device2_Release(device);    }    return refcount;}
开发者ID:ccpgames,项目名称:wine,代码行数:21,


示例22: d3d9_texture_3d_UnlockBox

static HRESULT WINAPI d3d9_texture_3d_UnlockBox(IDirect3DVolumeTexture9 *iface, UINT level){    struct d3d9_texture *texture = impl_from_IDirect3DVolumeTexture9(iface);    struct wined3d_resource *sub_resource;    struct d3d9_volume *volume_impl;    HRESULT hr;    TRACE("iface %p, level %u./n", iface, level);    wined3d_mutex_lock();    if (!(sub_resource = wined3d_texture_get_sub_resource(texture->wined3d_texture, level)))        hr = D3DERR_INVALIDCALL;    else    {        volume_impl = wined3d_resource_get_parent(sub_resource);        hr = IDirect3DVolume9_UnlockBox(&volume_impl->IDirect3DVolume9_iface);    }    wined3d_mutex_unlock();    return hr;}
开发者ID:Barrell,项目名称:wine,代码行数:21,


示例23: d3d8_volume_LockBox

static HRESULT WINAPI d3d8_volume_LockBox(IDirect3DVolume8 *iface,        D3DLOCKED_BOX *locked_box, const D3DBOX *box, DWORD flags){    struct d3d8_volume *volume = impl_from_IDirect3DVolume8(iface);    struct wined3d_map_desc map_desc;    HRESULT hr;    TRACE("iface %p, locked_box %p, box %p, flags %#x./n",            iface, locked_box, box, flags);    wined3d_mutex_lock();    hr = wined3d_resource_sub_resource_map(wined3d_texture_get_resource(volume->wined3d_texture), volume->sub_resource_idx,            &map_desc, (const struct wined3d_box *)box, flags);    wined3d_mutex_unlock();    locked_box->RowPitch = map_desc.row_pitch;    locked_box->SlicePitch = map_desc.slice_pitch;    locked_box->pBits = map_desc.data;    return hr;}
开发者ID:GYGit,项目名称:reactos,代码行数:21,


示例24: d3d9_init

BOOL d3d9_init(struct d3d9 *d3d9, BOOL extended){    DWORD flags = WINED3D_PRESENT_CONVERSION | WINED3D_HANDLE_RESTORE | WINED3D_PIXEL_CENTER_INTEGER;    if (!extended)        flags |= WINED3D_VIDMEM_ACCOUNTING;    else        flags |= WINED3D_RESTORE_MODE_ON_ACTIVATE;    d3d9->IDirect3D9Ex_iface.lpVtbl = &d3d9_vtbl;    d3d9->refcount = 1;    wined3d_mutex_lock();    d3d9->wined3d = wined3d_create(flags);    wined3d_mutex_unlock();    if (!d3d9->wined3d)        return FALSE;    d3d9->extended = extended;    return TRUE;}
开发者ID:Strongc,项目名称:reactos,代码行数:21,


示例25: query_init

HRESULT query_init(IDirect3DQuery9Impl *query, IDirect3DDevice9Impl *device, D3DQUERYTYPE type){    HRESULT hr;    query->lpVtbl = &Direct3DQuery9_Vtbl;    query->ref = 1;    wined3d_mutex_lock();    hr = IWineD3DDevice_CreateQuery(device->WineD3DDevice, type, &query->wineD3DQuery, (IUnknown *)query);    wined3d_mutex_unlock();    if (FAILED(hr))    {        WARN("Failed to create wined3d query, hr %#x./n", hr);        return hr;    }    query->parentDevice = (IDirect3DDevice9Ex *)device;    IDirect3DDevice9Ex_AddRef(query->parentDevice);    return D3D_OK;}
开发者ID:bilboed,项目名称:wine,代码行数:21,


示例26: dxgi_factory_Release

static ULONG STDMETHODCALLTYPE dxgi_factory_Release(IDXGIFactory1 *iface){    struct dxgi_factory *factory = impl_from_IDXGIFactory1(iface);    ULONG refcount = InterlockedDecrement(&factory->refcount);    TRACE("%p decreasing refcount to %u./n", iface, refcount);    if (!refcount)    {        if (factory->device_window)            DestroyWindow(factory->device_window);        wined3d_mutex_lock();        wined3d_decref(factory->wined3d);        wined3d_mutex_unlock();        wined3d_private_store_cleanup(&factory->private_store);        HeapFree(GetProcessHeap(), 0, factory);    }    return refcount;}
开发者ID:elppans,项目名称:wine-staging-1.9.15_IndexVertexBlending-1.9.11,代码行数:21,


示例27: d3d11_texture2d_Release

static ULONG STDMETHODCALLTYPE d3d11_texture2d_Release(ID3D11Texture2D *iface){    struct d3d_texture2d *texture = impl_from_ID3D11Texture2D(iface);    ULONG refcount = InterlockedDecrement(&texture->refcount);    TRACE("%p decreasing refcount to %u./n", texture, refcount);    if (!refcount)    {        ID3D11Device *device = texture->device;        wined3d_mutex_lock();        wined3d_texture_decref(texture->wined3d_texture);        wined3d_mutex_unlock();        /* Release the device last, it may cause the wined3d device to be         * destroyed. */        ID3D11Device_Release(device);    }    return refcount;}
开发者ID:neutrinolabs,项目名称:wine,代码行数:21,


示例28: query_init

HRESULT query_init(IDirect3DQuery9Impl *query, IDirect3DDevice9Impl *device, D3DQUERYTYPE type){    HRESULT hr;    query->IDirect3DQuery9_iface.lpVtbl = &Direct3DQuery9_Vtbl;    query->ref = 1;    wined3d_mutex_lock();    hr = wined3d_query_create(device->wined3d_device, type, &query->wineD3DQuery);    wined3d_mutex_unlock();    if (FAILED(hr))    {        WARN("Failed to create wined3d query, hr %#x./n", hr);        return hr;    }    query->parentDevice = &device->IDirect3DDevice9Ex_iface;    IDirect3DDevice9Ex_AddRef(query->parentDevice);    return D3D_OK;}
开发者ID:AmesianX,项目名称:RosWine,代码行数:21,


示例29: ddraw_clipper_SetHWnd

static HRESULT WINAPI ddraw_clipper_SetHWnd(IDirectDrawClipper *iface, DWORD flags, HWND window){    struct ddraw_clipper *clipper = impl_from_IDirectDrawClipper(iface);    TRACE("iface %p, flags %#x, window %p./n", iface, flags, window);    if (!ddraw_clipper_is_valid(clipper))        return DDERR_INVALIDPARAMS;    if (flags)    {        FIXME("flags %#x, not supported./n", flags);        return DDERR_INVALIDPARAMS;    }    wined3d_mutex_lock();    clipper->window = window;    wined3d_mutex_unlock();    return DD_OK;}
开发者ID:wine-mirror,项目名称:wine,代码行数:21,



注:本文中的wined3d_mutex_unlock函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ wined3d_resource_get_parent函数代码示例
C++ wined3d_mutex_lock函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。