wined3d: Store an IWineD3DClipperImpl pointer in IWineD3DSurfaceImpl.

This commit is contained in:
Henri Verbeet 2011-01-17 18:49:31 +01:00 committed by Alexandre Julliard
parent 098cdf4ae3
commit d91a413ade
3 changed files with 8 additions and 8 deletions

View File

@ -3507,16 +3507,16 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *dst_surface,
} }
/* Destination must be full surface or match the clipping rectangle */ /* Destination must be full surface or match the clipping rectangle */
if (dst_surface->clipper && ((IWineD3DClipperImpl *)dst_surface->clipper)->hWnd) if (dst_surface->clipper && dst_surface->clipper->hWnd)
{ {
RECT cliprect; RECT cliprect;
POINT pos[2]; POINT pos[2];
GetClientRect(((IWineD3DClipperImpl *)dst_surface->clipper)->hWnd, &cliprect); GetClientRect(dst_surface->clipper->hWnd, &cliprect);
pos[0].x = dst_rect.left; pos[0].x = dst_rect.left;
pos[0].y = dst_rect.top; pos[0].y = dst_rect.top;
pos[1].x = dst_rect.right; pos[1].x = dst_rect.right;
pos[1].y = dst_rect.bottom; pos[1].y = dst_rect.bottom;
MapWindowPoints(GetDesktopWindow(), ((IWineD3DClipperImpl *)dst_surface->clipper)->hWnd, pos, 2); MapWindowPoints(GetDesktopWindow(), dst_surface->clipper->hWnd, pos, 2);
if(pos[0].x != cliprect.left || pos[0].y != cliprect.top || if(pos[0].x != cliprect.left || pos[0].y != cliprect.top ||
pos[1].x != cliprect.right || pos[1].y != cliprect.bottom) pos[1].x != cliprect.right || pos[1].y != cliprect.bottom)

View File

@ -471,7 +471,7 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetClipper(IWineD3DSurface *iface, IWineD
IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *) iface; IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *) iface;
TRACE("(%p)->(%p)\n", This, clipper); TRACE("(%p)->(%p)\n", This, clipper);
This->clipper = clipper; This->clipper = (IWineD3DClipperImpl *)clipper;
return WINED3D_OK; return WINED3D_OK;
} }
@ -480,10 +480,10 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetClipper(IWineD3DSurface *iface, IWineD
IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *) iface; IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *) iface;
TRACE("(%p)->(%p)\n", This, clipper); TRACE("(%p)->(%p)\n", This, clipper);
*clipper = This->clipper; *clipper = (IWineD3DClipper *)This->clipper;
if(*clipper) { if (*clipper)
IWineD3DClipper_AddRef(*clipper); IWineD3DClipper_AddRef(*clipper);
}
return WINED3D_OK; return WINED3D_OK;
} }

View File

@ -2140,7 +2140,7 @@ struct IWineD3DSurfaceImpl
SIZE ds_current_size; SIZE ds_current_size;
/* DirectDraw clippers */ /* DirectDraw clippers */
IWineD3DClipper *clipper; struct IWineD3DClipperImpl *clipper;
/* DirectDraw Overlay handling */ /* DirectDraw Overlay handling */
RECT overlay_srcrect; RECT overlay_srcrect;