[2/4] wined3d: Create CPU blitter also for GDI render.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[2/4] wined3d: Create CPU blitter also for GDI render.

Sebastian Lackner
Fixes a regression introduced in cad4badbcf25992e0c61521aa15e639c2611f5d6.

Signed-off-by: Sebastian Lackner <[hidden email]>
---
 dlls/wined3d/device.c |   11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index ded4af6616..3d12e417a4 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -1164,6 +1164,15 @@ HRESULT CDECL wined3d_device_init_gdi(struct wined3d_device *device,
         goto err_out;
     }
     device->swapchains[0] = swapchain;
+
+    if (!(device->blitter = wined3d_cpu_blitter_create()))
+    {
+        ERR("Failed to create CPU blitter.\n");
+        HeapFree(GetProcessHeap(), 0, device->swapchains);
+        device->swapchain_count = 0;
+        goto err_out;
+    }
+
     return WINED3D_OK;
 
 err_out:
@@ -1252,6 +1261,8 @@ HRESULT CDECL wined3d_device_uninit_gdi(struct wined3d_device *device)
 {
     unsigned int i;
 
+    device->blitter->ops->blitter_destroy(device->blitter, NULL);
+
     for (i = 0; i < device->swapchain_count; ++i)
     {
         TRACE("Releasing the implicit swapchain %u.\n", i);
--
2.13.1


Reply | Threaded
Open this post in threaded view
|

Re: [2/4] wined3d: Create CPU blitter also for GDI render.

Henri Verbeet-2
Signed-off-by: Henri Verbeet <[hidden email]>