user32: Track the number of GL surfaces for a window rather than the pixel format.

Ken Thomases ken at codeweavers.com
Tue May 6 22:23:00 CDT 2014


On May 6, 2014, at 8:42 AM, Alexandre Julliard wrote:

> Ken Thomases <ken at codeweavers.com> writes:
> 
>> The specific pixel format was never used.  It was effectively just a flag
>> indicating if the window had a GL surface.  This generalizes it from a flag
>> to a count, to allow for multiple GL surfaces.
> 
> I'm not convinced that the concept of multiple surfaces makes sense,
> except maybe as a driver implementation detail.

Well, it doesn't make much sense for user32 to know the particular pixel format, either.  There's not a single pixel format for each window.  WGL and D3D can use separate formats.  That's at the center of what I'm doing.

A change to use a boolean flag instead of a pixel format ID would be as complicated for user32 as this patch and would make the driver work more complicated.

It seems to me that this is purely a practical matter.  We need user32 to behave differently when there's any GL surface(s) than when there are none.  Something has to keep count and it seems simplest to track the count in user32.

Leaving aside the specifics of the implementation (i.e. the WGL_WINE_surface extension), conceptually, either or both of WGL and D3D need to be able to independently tell user32 to make this change in its behavior.

-Ken




More information about the wine-devel mailing list