Stefan Dösinger : wined3d: Implement IWineD3DSurface:: BltFast.
Alexandre Julliard
julliard at wine.codeweavers.com
Fri May 26 13:55:33 CDT 2006
Module: wine
Branch: refs/heads/master
Commit: 34a959c6ebe159fb6aca5251cd6c813c47208cbc
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=34a959c6ebe159fb6aca5251cd6c813c47208cbc
Author: Stefan Dösinger <stefan at codeweavers.com>
Date: Fri May 26 12:19:28 2006 +0200
wined3d: Implement IWineD3DSurface::BltFast.
---
dlls/wined3d/surface.c | 34 ++++++++++++++++++++++++++++++++--
1 files changed, 32 insertions(+), 2 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index c21e715..054eecc 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -2481,8 +2481,38 @@ HRESULT WINAPI IWineD3DSurfaceImpl_Resto
}
HRESULT WINAPI IWineD3DSurfaceImpl_BltFast(IWineD3DSurface *iface, DWORD dstx, DWORD dsty, IWineD3DSurface *Source, RECT *rsrc, DWORD trans) {
- FIXME("This is unimplemented for now(d3d7 merge)\n");
- return WINED3DERR_INVALIDCALL;
+ IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *) iface;
+ IWineD3DSurfaceImpl *srcImpl = (IWineD3DSurfaceImpl *) Source;
+ TRACE("(%p)->(%ld, %ld, %p, %p, %08lx\n", iface, dstx, dsty, Source, rsrc, trans);
+
+ /* Special cases for RenderTargets */
+ if( (This->resource.usage & WINED3DUSAGE_RENDERTARGET) ||
+ ( srcImpl && (srcImpl->resource.usage & WINED3DUSAGE_RENDERTARGET) )) {
+
+ RECT SrcRect, DstRect;
+
+ if(rsrc) {
+ SrcRect.left = rsrc->left;
+ SrcRect.top= rsrc->top;
+ SrcRect.bottom = rsrc->bottom;
+ SrcRect.right = rsrc->right;
+ } else {
+ SrcRect.left = 0;
+ SrcRect.top = 0;
+ SrcRect.right = srcImpl->currentDesc.Width;
+ SrcRect.bottom = srcImpl->currentDesc.Height;
+ }
+
+ DstRect.left = dstx;
+ DstRect.top=dsty;
+ DstRect.right = dstx + SrcRect.right - SrcRect.left;
+ DstRect.bottom = dsty + SrcRect.bottom - SrcRect.top;
+
+ if(IWineD3DSurfaceImpl_BltOverride(This, &DstRect, Source, &SrcRect, 0, NULL) == WINED3D_OK) return WINED3D_OK;
+ }
+
+
+ return IWineGDISurfaceImpl_BltFast(iface, dstx, dsty, Source, rsrc, trans);
}
HRESULT WINAPI IWineD3DSurfaceImpl_SetPixelFormat(IWineD3DSurface *iface, WINED3DFORMAT Format, BYTE *Surface, DWORD Size) {
More information about the wine-cvs
mailing list