[3/6] WineD3D: A function for checking if a surface is offscreen

Henri Verbeet hverbeet at gmail.com
Wed Dec 2 15:10:25 CST 2009

2009/12/2 Stefan Dösinger <stefan at codeweavers.com>:
> @@ -5674,7 +5674,7 @@ static void color_fill_fbo(IWineD3DDevice *iface, IWineD3DSurface *surface,
>      IWineD3DSwapChain *swapchain;
>      swapchain = get_swapchain(surface);
> -    if (swapchain) {
> +    if (!surface_is_offscreen(surface)) {
That's ok, but the code that sets up the scissor rect further down
also uses "swapchain" like this. Also, some of the changes to e.g.
read_from_framebuffer() in patch 4 are really the same as what you're
doing in this patch.

Btw, note that the surface being offscreen is the common case, and
onscreen surfaces are the exception. Maybe surface_is_onscreen() makes
more sense, but I'll leave that up to you.

More information about the wine-devel mailing list