Lines Matching refs:This

10  * This library is free software; you can redistribute it and/or
15 * This library is distributed in the hope that it will be useful,
42 IWineD3DTextureImpl *This = (IWineD3DTextureImpl *)iface;
43 IWineD3DDeviceImpl *device = This->resource.device;
49 TRACE("(%p) : About to load texture.\n", This);
66 srgb_mode = This->baseTexture.is_srgb;
69 dirty = srgb_mode ? &This->baseTexture.texture_srgb.dirty : &This->baseTexture.texture_rgb.dirty;
78 if (This->resource.format_desc->format == WINED3DFMT_P8_UINT
79 || This->resource.format_desc->format == WINED3DFMT_P8_UINT_A8_UNORM)
81 for (i = 0; i < This->baseTexture.levels; ++i)
83 if (palette9_changed((IWineD3DSurfaceImpl *)This->surfaces[i]))
86 /* TODO: This is not necessarily needed with hw palettized texture support. */
87 IWineD3DSurface_LoadLocation(This->surfaces[i], SFLAG_INSYSMEM, NULL);
89 IWineD3DSurface_ModifyLocation(This->surfaces[i], SFLAG_INTEXTURE, FALSE);
98 for (i = 0; i < This->baseTexture.levels; ++i)
100 IWineD3DSurface_LoadTexture(This->surfaces[i], srgb_mode);
114 static void texture_cleanup(IWineD3DTextureImpl *This)
118 TRACE("(%p) : Cleaning up\n", This);
120 for (i = 0; i < This->baseTexture.levels; ++i)
122 if (This->surfaces[i])
126 surface_set_texture_name(This->surfaces[i], 0, TRUE);
127 surface_set_texture_name(This->surfaces[i], 0, FALSE);
128 surface_set_texture_target(This->surfaces[i], 0);
129 IWineD3DSurface_SetContainer(This->surfaces[i], 0);
130 IWineD3DSurface_Release(This->surfaces[i]);
134 TRACE("(%p) : Cleaning up base texture\n", This);
135 basetexture_cleanup((IWineD3DBaseTexture *)This);
144 IWineD3DTextureImpl *This = (IWineD3DTextureImpl *)iface;
145 TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppobj);
152 *ppobj = This;
160 IWineD3DTextureImpl *This = (IWineD3DTextureImpl *)iface;
161 TRACE("(%p) : AddRef increasing from %d\n", This, This->resource.ref);
162 return InterlockedIncrement(&This->resource.ref);
166 IWineD3DTextureImpl *This = (IWineD3DTextureImpl *)iface;
168 TRACE("(%p) : Releasing from %d\n", This, This->resource.ref);
169 ref = InterlockedDecrement(&This->resource.ref);
172 texture_cleanup(This);
173 This->resource.parent_ops->wined3d_object_destroyed(This->resource.parent);
174 HeapFree(GetProcessHeap(), 0, This);
209 IWineD3DTextureImpl *This = (IWineD3DTextureImpl *)iface;
210 TRACE("(%p)\n", This);
216 for (i = 0; i < This->baseTexture.levels; i++) {
217 IWineD3DSurface_UnLoad(This->surfaces[i]);
218 surface_set_texture_name(This->surfaces[i], 0, FALSE); /* Delete rgb name */
219 surface_set_texture_name(This->surfaces[i], 0, TRUE); /* delete srgb name */
235 IWineD3DTextureImpl *This = (IWineD3DTextureImpl*)iface;
246 for (i = 0; i < This->baseTexture.levels; ++i)
248 if (This->surfaces[i])
250 HRESULT tmpHr = IWineD3DResource_SetShRcState((IWineD3DResource*)This->surfaces[i], enmState);
255 if (!This->resource.device->isInDraw)
257 context = context_acquire(This->resource.device, NULL, CTXUSAGE_RESOURCELOAD);
272 device_cleanup_durtify_texture_target(This->resource.device, This->target);
319 IWineD3DTextureImpl *This = (IWineD3DTextureImpl *)iface;
323 TRACE("(%p) : relay to BaseTexture\n", This);
330 if(This->baseTexture.is_srgb) {
331 gl_tex = &This->baseTexture.texture_srgb;
333 gl_tex = &This->baseTexture.texture_rgb;
336 for (i = 0; i < This->baseTexture.levels; ++i) {
337 surface_set_texture_name(This->surfaces[i], gl_tex->name, This->baseTexture.is_srgb);
347 if (!VBOXSHRC_IS_SHARED_OPENED(This))
373 IWineD3DTextureImpl *This = (IWineD3DTextureImpl *)iface;
374 TRACE("(%p)\n", This);
376 return This->target;
380 IWineD3DTextureImpl *This = (IWineD3DTextureImpl *)iface;
381 TRACE("(%p)\n", This);
383 return This->cond_np2;
390 IWineD3DTextureImpl *This = (IWineD3DTextureImpl *)iface;
392 if (Level < This->baseTexture.levels) {
393 TRACE("(%p) Level (%d)\n", This, Level);
394 return IWineD3DSurface_GetDesc(This->surfaces[Level], pDesc);
396 WARN("(%p) level(%d) overflow Levels(%d)\n", This, Level, This->baseTexture.levels);
401 IWineD3DTextureImpl *This = (IWineD3DTextureImpl *)iface;
404 if (Level < This->baseTexture.levels) {
405 *ppSurfaceLevel = This->surfaces[Level];
406 IWineD3DSurface_AddRef(This->surfaces[Level]);
408 TRACE("(%p) : returning %p for level %d\n", This, *ppSurfaceLevel, Level);
411 WARN("(%p) level(%d) overflow Levels(%d)\n", This, Level, This->baseTexture.levels);
419 IWineD3DTextureImpl *This = (IWineD3DTextureImpl *)iface;
422 if (Level < This->baseTexture.levels) {
423 hr = IWineD3DSurface_LockRect(This->surfaces[Level], pLockedRect, pRect, Flags);
426 TRACE("(%p) Level (%d) success\n", This, Level);
428 WARN("(%p) level(%d) overflow Levels(%d)\n", This, Level, This->baseTexture.levels);
435 IWineD3DTextureImpl *This = (IWineD3DTextureImpl *)iface;
438 if (Level < This->baseTexture.levels) {
439 hr = IWineD3DSurface_UnlockRect(This->surfaces[Level]);
442 TRACE("(%p) Level (%d) success\n", This, Level);
444 WARN("(%p) level(%d) overflow Levels(%d)\n", This, Level, This->baseTexture.levels);
450 IWineD3DTextureImpl *This = (IWineD3DTextureImpl *)iface;
451 This->baseTexture.texture_rgb.dirty = TRUE;
452 This->baseTexture.texture_srgb.dirty = TRUE;
453 TRACE("(%p) : dirtyfication of surface Level (0)\n", This);
454 surface_add_dirty_rect(This->surfaces[0], pDirtyRect);