On Monday 31 October 2011 19:48:12 Henri Verbeet wrote:
dlls/ddraw/surface.c | 3 +++ dlls/wined3d/surface.c | 11 +++++++++++ include/wine/wined3d.h | 1 + 3 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c index 3860959..567d086 100644 --- a/dlls/ddraw/surface.c +++ b/dlls/ddraw/surface.c @@ -5273,6 +5273,9 @@ HRESULT ddraw_surface_init(IDirectDrawSurfaceImpl *surface, IDirectDrawImpl *ddr if (desc->ddsCaps.dwCaps & DDSCAPS_ZBUFFER) usage |= WINED3DUSAGE_DEPTHSTENCIL;
- if (desc->ddsCaps.dwCaps & DDSCAPS_OWNDC)
usage |= WINED3DUSAGE_OWNDC;
You would get the same effect by calling GetDC and ReleaseDC from ddraw or ddrawex without another usage flag. Probably ddrawex should do that since it sets DDSCAPS_OWNDC, assuming that IE 8 still uses ddrawex.
- /* Similar to lockable rendertargets above, creating the DIB section
* during surface initialization prevents the sysmem pointer from
changing + * after a wined3d_surface_getdc() call. */
Is this a property of DDSCAPS_OWNDC, or sysmem surfaces in general? I'd expect that this applies to sysmem surfaces in general. Otoh we don't really want to create a DIB section for every sysmem surface, especially with bug 5535 in mind.