Pavel Procházka's commit

Stefan Dösinger stefandoesinger at gmx.at
Mon Jun 22 02:45:12 CDT 2009


Hi,

Please send one patch per email. If you have 3 patches, like in this case, 
please send 3 emails

All the patches have trailing whitespaces in some places, and mix tabs and 
4-space indentation. Please avoid trailing whitespaces and use 4 spaces for 
indentation everywhere.

In the test:
Please define BACKBUFFERCOUNT somewhere close or in TestMultibuffering

I recommend to perform one flip, then check the colors, perform another flip 
and check again. Flipping an arbitrary amount of times and then checking the 
colors once makes it hard to see what is going on. The 15 flips may also by 
chance sum up to a no-op or lead to a wrong conclusion.

> +    if(!StartMultibuffering())
> +    {
> +        skip("An error when initializing multibuffering!, skipping . . .
\n");
> +        return;
> +    }
I recommend not to skip the D3D tests if the multibuffering test fails to 
initialize for some reason(ie, remove the return)

> +LPDIRECTDRAW lpDD = NULL;
The rest of the test uses IDirectDraw *DD instead of LPDIRECTDRAW for COM 
interfaces

The infinite amount of back buffers patch: We currently don't have a test for 
this, but msdn says that d3d8 and d3d9 have this limit on the amount of 
backbuffers. If you remove it from wined3d, please add the verification to 
d3d8.dll and d3d9.dll to make sure they still enforce this limit. Or write a 
d3d9 test to prove msdn wrong. There is already a test for swapchains in 
dlls/d3d9/tests/device.c, test_swapchain(). It should be fairly easy to test 
a too high backbuffer count there.

The third patch(_Present relevant to windows implementation
 Making multibuffering working well when flip):

> back  = *((IWineD3DSurfaceImpl *)This->backBuffer[0]); /*this value can not 
be pointer*/
I don't like this, this copies too much data. Please just backup the fields 
you need

>     {
>-        HDC tmp;
> -        tmp = front->hDC;
> -        front->hDC = back->hDC;
> -        back->hDC = tmp;
> +        front->hDC = back.hDC;
>     }

This will leave this code:

{
    front->hDC = back.hDC;
}
Since you're not declaring any local variable any longer, please remove the {}



More information about the wine-devel mailing list