Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
4891ca16
Commit
4891ca16
authored
Jan 24, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Jan 24, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Remove IWineD3DSurface::DrawOverlay() from the public interface.
parent
05603c45
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
40 deletions
+40
-40
surface.c
dlls/wined3d/surface.c
+30
-30
surface_base.c
dlls/wined3d/surface_base.c
+2
-2
surface_gdi.c
dlls/wined3d/surface_gdi.c
+7
-6
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-0
wined3d.idl
include/wine/wined3d.idl
+0
-2
No files found.
dlls/wined3d/surface.c
View file @
4891ca16
...
...
@@ -386,9 +386,32 @@ static void surface_realize_palette(IWineD3DSurfaceImpl *surface)
surface_load_location
(
surface
,
SFLAG_INDRAWABLE
,
NULL
);
}
static
HRESULT
surface_draw_overlay
(
IWineD3DSurfaceImpl
*
surface
)
{
HRESULT
hr
;
/* If there's no destination surface there is nothing to do. */
if
(
!
surface
->
overlay_dest
)
return
WINED3D_OK
;
/* Blt calls ModifyLocation on the dest surface, which in turn calls
* DrawOverlay to update the overlay. Prevent an endless recursion. */
if
(
surface
->
overlay_dest
->
flags
&
SFLAG_INOVERLAYDRAW
)
return
WINED3D_OK
;
surface
->
overlay_dest
->
flags
|=
SFLAG_INOVERLAYDRAW
;
hr
=
IWineD3DSurface_Blt
((
IWineD3DSurface
*
)
surface
->
overlay_dest
,
&
surface
->
overlay_destrect
,
(
IWineD3DSurface
*
)
surface
,
&
surface
->
overlay_srcrect
,
WINEDDBLT_WAIT
,
NULL
,
WINED3DTEXF_LINEAR
);
surface
->
overlay_dest
->
flags
&=
~
SFLAG_INOVERLAYDRAW
;
return
hr
;
}
static
const
struct
wined3d_surface_ops
surface_ops
=
{
surface_realize_palette
,
surface_draw_overlay
,
};
HRESULT
surface_init
(
IWineD3DSurfaceImpl
*
surface
,
WINED3DSURFTYPE
surface_type
,
UINT
alignment
,
...
...
@@ -2070,9 +2093,9 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_Unmap(IWineD3DSurface *iface)
memset
(
&
This
->
lockedRect
,
0
,
sizeof
(
RECT
));
/* Overlays have to be redrawn manually after changes with the GL implementation */
if
(
This
->
overlay_dest
)
{
IWineD3DSurface_DrawOverlay
(
iface
);
}
if
(
This
->
overlay_dest
)
This
->
surface_ops
->
surface_draw_overlay
(
This
);
return
WINED3D_OK
;
}
...
...
@@ -2775,11 +2798,10 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_Flip(IWineD3DSurface *iface, IWineD3DS
flip_surface
(
This
,
(
IWineD3DSurfaceImpl
*
)
override
);
/* Update the overlay if it is visible */
if
(
This
->
overlay_dest
)
{
return
IWineD3DSurface_DrawOverlay
((
IWineD3DSurface
*
)
This
);
}
else
{
if
(
This
->
overlay_dest
)
return
This
->
surface_ops
->
surface_draw_overlay
(
This
);
else
return
WINED3D_OK
;
}
}
if
(
override
)
{
...
...
@@ -4306,7 +4328,7 @@ void surface_modify_location(IWineD3DSurfaceImpl *surface, DWORD flag, BOOL pers
{
LIST_FOR_EACH_ENTRY
(
overlay
,
&
surface
->
overlays
,
IWineD3DSurfaceImpl
,
overlay_entry
)
{
IWineD3DSurface_DrawOverlay
((
IWineD3DSurface
*
)
overlay
);
overlay
->
surface_ops
->
surface_draw_overlay
(
overlay
);
}
}
}
...
...
@@ -4641,27 +4663,6 @@ static WINED3DSURFTYPE WINAPI IWineD3DSurfaceImpl_GetImplType(IWineD3DSurface *i
return
SURFACE_OPENGL
;
}
static
HRESULT
WINAPI
IWineD3DSurfaceImpl_DrawOverlay
(
IWineD3DSurface
*
iface
)
{
IWineD3DSurfaceImpl
*
This
=
(
IWineD3DSurfaceImpl
*
)
iface
;
HRESULT
hr
;
/* If there's no destination surface there is nothing to do */
if
(
!
This
->
overlay_dest
)
return
WINED3D_OK
;
/* Blt calls ModifyLocation on the dest surface, which in turn calls DrawOverlay to
* update the overlay. Prevent an endless recursion. */
if
(
This
->
overlay_dest
->
flags
&
SFLAG_INOVERLAYDRAW
)
return
WINED3D_OK
;
This
->
overlay_dest
->
flags
|=
SFLAG_INOVERLAYDRAW
;
hr
=
IWineD3DSurfaceImpl_Blt
((
IWineD3DSurface
*
)
This
->
overlay_dest
,
&
This
->
overlay_destrect
,
iface
,
&
This
->
overlay_srcrect
,
WINEDDBLT_WAIT
,
NULL
,
WINED3DTEXF_LINEAR
);
This
->
overlay_dest
->
flags
&=
~
SFLAG_INOVERLAYDRAW
;
return
hr
;
}
BOOL
surface_is_offscreen
(
IWineD3DSurfaceImpl
*
surface
)
{
IWineD3DSwapChainImpl
*
swapchain
=
surface
->
container
.
u
.
swapchain
;
...
...
@@ -4721,7 +4722,6 @@ const IWineD3DSurfaceVtbl IWineD3DSurface_Vtbl =
IWineD3DSurfaceImpl_SetFormat
,
IWineD3DSurfaceImpl_PrivateSetup
,
IWineD3DSurfaceImpl_GetImplType
,
IWineD3DSurfaceImpl_DrawOverlay
};
static
HRESULT
ffp_blit_alloc
(
IWineD3DDeviceImpl
*
device
)
{
return
WINED3D_OK
;
}
...
...
dlls/wined3d/surface_base.c
View file @
4891ca16
...
...
@@ -357,7 +357,7 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetOverlayPosition(IWineD3DSurface *iface
This
->
overlay_destrect
.
right
=
X
+
w
;
This
->
overlay_destrect
.
bottom
=
Y
+
h
;
IWineD3DSurface_DrawOverlay
(
iface
);
This
->
surface_ops
->
surface_draw_overlay
(
This
);
return
WINED3D_OK
;
}
...
...
@@ -462,7 +462,7 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_UpdateOverlay(IWineD3DSurface *iface, con
This
->
overlay_dest
=
NULL
;
}
IWineD3DSurface_DrawOverlay
(
iface
);
This
->
surface_ops
->
surface_draw_overlay
(
This
);
return
WINED3D_OK
;
}
...
...
dlls/wined3d/surface_gdi.c
View file @
4891ca16
...
...
@@ -95,9 +95,16 @@ static void gdi_surface_realize_palette(IWineD3DSurfaceImpl *surface)
}
}
static
HRESULT
gdi_surface_draw_overlay
(
IWineD3DSurfaceImpl
*
surface
)
{
FIXME
(
"GDI surfaces can't draw overlays yet.
\n
"
);
return
E_FAIL
;
}
static
const
struct
wined3d_surface_ops
gdi_surface_ops
=
{
gdi_surface_realize_palette
,
gdi_surface_draw_overlay
,
};
/*****************************************************************************
...
...
@@ -439,11 +446,6 @@ static WINED3DSURFTYPE WINAPI IWineGDISurfaceImpl_GetImplType(IWineD3DSurface *i
return
SURFACE_GDI
;
}
static
HRESULT
WINAPI
IWineGDISurfaceImpl_DrawOverlay
(
IWineD3DSurface
*
iface
)
{
FIXME
(
"GDI surfaces can't draw overlays yet
\n
"
);
return
E_FAIL
;
}
/* FIXME: This vtable should not use any IWineD3DSurface* implementation functions,
* only IWineD3DBaseSurface and IWineGDISurface ones.
*/
...
...
@@ -491,5 +493,4 @@ const IWineD3DSurfaceVtbl IWineGDISurface_Vtbl =
IWineD3DBaseSurfaceImpl_SetFormat
,
IWineGDISurfaceImpl_PrivateSetup
,
IWineGDISurfaceImpl_GetImplType
,
IWineGDISurfaceImpl_DrawOverlay
};
dlls/wined3d/wined3d_private.h
View file @
4891ca16
...
...
@@ -2091,6 +2091,7 @@ struct wined3d_subresource_container
struct
wined3d_surface_ops
{
void
(
*
surface_realize_palette
)(
struct
IWineD3DSurfaceImpl
*
surface
);
HRESULT
(
*
surface_draw_overlay
)(
struct
IWineD3DSurfaceImpl
*
surface
);
};
/*****************************************************************************
...
...
include/wine/wined3d.idl
View file @
4891ca16
...
...
@@ -2467,8 +2467,6 @@ interface IWineD3DSurface : IWineD3DResource
)
;
WINED3DSURFTYPE
GetImplType
(
)
;
HRESULT
DrawOverlay
(
)
;
}
[
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment