Henri Verbeet : wined3d: Use surface_color_fill() in IWineD3DDeviceImpl_ClearRendertargetView().
Alexandre Julliard
julliard at winehq.org
Mon Aug 30 13:00:39 CDT 2010
Module: wine
Branch: master
Commit: 0a28300c49bc987f0b08cfe8b648933fcb710dfb
URL: http://source.winehq.org/git/wine.git/?a=commit;h=0a28300c49bc987f0b08cfe8b648933fcb710dfb
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Sun Aug 29 21:57:44 2010 +0200
wined3d: Use surface_color_fill() in IWineD3DDeviceImpl_ClearRendertargetView().
---
dlls/wined3d/device.c | 27 ++-------------------------
1 files changed, 2 insertions(+), 25 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index cac6830..a90ad80 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -5518,7 +5518,6 @@ static void WINAPI IWineD3DDeviceImpl_ClearRendertargetView(IWineD3DDevice *ifac
IWineD3DRendertargetView *rendertarget_view, const WINED3DCOLORVALUE *color)
{
IWineD3DResource *resource;
- IWineD3DSurfaceImpl *surface;
HRESULT hr;
hr = IWineD3DRendertargetView_GetResource(rendertarget_view, &resource);
@@ -5535,30 +5534,8 @@ static void WINAPI IWineD3DDeviceImpl_ClearRendertargetView(IWineD3DDevice *ifac
return;
}
- surface = (IWineD3DSurfaceImpl *)resource;
-
- if (wined3d_settings.offscreen_rendering_mode == ORM_FBO)
- {
- const RECT draw_rect = {0, 0, surface->currentDesc.Width, surface->currentDesc.Height};
-
- device_clear_render_targets((IWineD3DDeviceImpl *)iface, 1, &surface,
- 0, NULL, &draw_rect, WINED3DCLEAR_TARGET, color, 0.0f, 0);
- }
- else
- {
- WINEDDBLTFX BltFx;
-
- /* Just forward this to the DirectDraw blitting engine */
- memset(&BltFx, 0, sizeof(BltFx));
- BltFx.dwSize = sizeof(BltFx);
- BltFx.u5.dwFillColor = wined3d_format_convert_from_float(surface->resource.format_desc, color);
- hr = IWineD3DSurface_Blt((IWineD3DSurface *)surface, NULL, NULL, NULL,
- WINEDDBLT_COLORFILL, &BltFx, WINED3DTEXF_POINT);
- if (FAILED(hr))
- {
- ERR("Blt failed, hr %#x\n", hr);
- }
- }
+ hr = surface_color_fill((IWineD3DSurfaceImpl *)resource, NULL, color);
+ if (FAILED(hr)) ERR("Color fill failed, hr %#x.\n", hr);
IWineD3DResource_Release(resource);
}
More information about the wine-cvs
mailing list