• Home
  • Raw
  • Download

Lines Matching refs:This

34 NineUnknown_ctor( struct NineUnknown *This,  in NineUnknown_ctor()  argument
38 This->refs = 0; in NineUnknown_ctor()
39 This->forward = true; in NineUnknown_ctor()
40 This->bind = 0; in NineUnknown_ctor()
43 This->refs = 0; in NineUnknown_ctor()
44 This->forward = false; in NineUnknown_ctor()
45 This->bind = 1; in NineUnknown_ctor()
47 This->refs = 1; in NineUnknown_ctor()
48 This->forward = false; in NineUnknown_ctor()
49 This->bind = 0; in NineUnknown_ctor()
52 This->container = pParams->container; in NineUnknown_ctor()
53 This->device = pParams->device; in NineUnknown_ctor()
54 if (This->refs && This->device) in NineUnknown_ctor()
55 NineUnknown_AddRef(NineUnknown(This->device)); in NineUnknown_ctor()
57 This->vtable = pParams->vtable; in NineUnknown_ctor()
58 This->vtable_internal = pParams->vtable; in NineUnknown_ctor()
59 This->guids = pParams->guids; in NineUnknown_ctor()
60 This->dtor = pParams->dtor; in NineUnknown_ctor()
62 This->pdata = _mesa_hash_table_create(NULL, ht_guid_hash, ht_guid_compare); in NineUnknown_ctor()
63 if (!This->pdata) in NineUnknown_ctor()
70 NineUnknown_dtor( struct NineUnknown *This ) in NineUnknown_dtor() argument
72 if (This->refs && This->device) /* Possible only if early exit after a ctor failed */ in NineUnknown_dtor()
73 (void) NineUnknown_Release(NineUnknown(This->device)); in NineUnknown_dtor()
75 if (This->pdata) in NineUnknown_dtor()
76 _mesa_hash_table_destroy(This->pdata, ht_guid_delete); in NineUnknown_dtor()
78 FREE(This); in NineUnknown_dtor()
82 NineUnknown_QueryInterface( struct NineUnknown *This, in NineUnknown_QueryInterface() argument
90 This, riid, riid ? GUID_sprintf(guid_str, riid) : "", ppvObject); in NineUnknown_QueryInterface()
97 if (GUID_equal(This->guids[i], riid)) { in NineUnknown_QueryInterface()
98 *ppvObject = This; in NineUnknown_QueryInterface()
103 NineUnknown_AddRef(This); in NineUnknown_QueryInterface()
106 } while (This->guids[++i]); in NineUnknown_QueryInterface()
113 NineUnknown_AddRef( struct NineUnknown *This ) in NineUnknown_AddRef() argument
116 if (This->forward) in NineUnknown_AddRef()
117 return NineUnknown_AddRef(This->container); in NineUnknown_AddRef()
119 r = p_atomic_inc_return(&This->refs); in NineUnknown_AddRef()
122 if (This->device) in NineUnknown_AddRef()
123 NineUnknown_AddRef(NineUnknown(This->device)); in NineUnknown_AddRef()
129 NineUnknown_Release( struct NineUnknown *This ) in NineUnknown_Release() argument
131 if (This->forward) in NineUnknown_Release()
132 return NineUnknown_Release(This->container); in NineUnknown_Release()
138 if (!p_atomic_read(&This->refs)) in NineUnknown_Release()
141 ULONG r = p_atomic_dec_return(&This->refs); in NineUnknown_Release()
144 struct NineDevice9 *device = This->device; in NineUnknown_Release()
147 if (!This->container && This->bind == 0) { in NineUnknown_Release()
148 This->dtor(This); in NineUnknown_Release()
160 NineUnknown_ReleaseWithDtorLock( struct NineUnknown *This ) in NineUnknown_ReleaseWithDtorLock() argument
162 if (This->forward) in NineUnknown_ReleaseWithDtorLock()
163 return NineUnknown_ReleaseWithDtorLock(This->container); in NineUnknown_ReleaseWithDtorLock()
165 ULONG r = p_atomic_dec_return(&This->refs); in NineUnknown_ReleaseWithDtorLock()
168 struct NineDevice9 *device = This->device; in NineUnknown_ReleaseWithDtorLock()
170 if (!This->container && This->bind == 0) { in NineUnknown_ReleaseWithDtorLock()
172 This->dtor(This); in NineUnknown_ReleaseWithDtorLock()
183 NineUnknown_GetDevice( struct NineUnknown *This, in NineUnknown_GetDevice() argument
187 NineUnknown_AddRef(NineUnknown(This->device)); in NineUnknown_GetDevice()
188 *ppDevice = (IDirect3DDevice9 *)This->device; in NineUnknown_GetDevice()
193 NineUnknown_SetPrivateData( struct NineUnknown *This, in NineUnknown_SetPrivateData() argument
205 This, GUID_sprintf(guid_str, refguid), pData, SizeOfData, Flags); in NineUnknown_SetPrivateData()
218 NineUnknown_FreePrivateData(This, refguid); in NineUnknown_SetPrivateData()
233 _mesa_hash_table_insert(This->pdata, &header->guid, header); in NineUnknown_SetPrivateData()
239 NineUnknown_GetPrivateData( struct NineUnknown *This, in NineUnknown_GetPrivateData() argument
251 This, GUID_sprintf(guid_str, refguid), pData, pSizeOfData); in NineUnknown_GetPrivateData()
255 entry = _mesa_hash_table_search(This->pdata, refguid); in NineUnknown_GetPrivateData()
283 NineUnknown_FreePrivateData( struct NineUnknown *This, in NineUnknown_FreePrivateData() argument
289 DBG("This=%p GUID=%s\n", This, GUID_sprintf(guid_str, refguid)); in NineUnknown_FreePrivateData()
293 entry = _mesa_hash_table_search(This->pdata, refguid); in NineUnknown_FreePrivateData()
301 _mesa_hash_table_remove(This->pdata, entry); in NineUnknown_FreePrivateData()