Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
fad3f9ba
Commit
fad3f9ba
authored
Aug 01, 2008
by
Stefan Dösinger
Committed by
Alexandre Julliard
Aug 05, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Basic overlay emulation with opengl.
parent
e795d842
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
3 deletions
+36
-3
surface.c
dlls/wined3d/surface.c
+22
-1
surface_base.c
dlls/wined3d/surface_base.c
+5
-1
surface_gdi.c
dlls/wined3d/surface_gdi.c
+7
-1
wined3d_interface.h
include/wine/wined3d_interface.h
+2
-0
No files found.
dlls/wined3d/surface.c
View file @
fad3f9ba
...
...
@@ -1378,6 +1378,11 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_UnlockRect(IWineD3DSurface *iface) {
unlock_end:
This
->
Flags
&=
~
SFLAG_LOCKED
;
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
);
}
return
WINED3D_OK
;
}
...
...
@@ -3338,6 +3343,7 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, RECT *
/* Activate the destination context, set it up for blitting */
myDevice
->
activeContext
->
last_was_blit
=
FALSE
;
ActivateContext
(
myDevice
,
(
IWineD3DSurface
*
)
This
,
CTXUSAGE_BLIT
);
if
(
!
dstSwapchain
)
{
...
...
@@ -4452,6 +4458,20 @@ 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
;
hr
=
IWineD3DSurfaceImpl_Blt
((
IWineD3DSurface
*
)
This
->
overlay_dest
,
&
This
->
overlay_destrect
,
iface
,
&
This
->
overlay_srcrect
,
WINEDDBLT_WAIT
,
NULL
,
WINED3DTEXF_LINEAR
);
return
hr
;
}
const
IWineD3DSurfaceVtbl
IWineD3DSurface_Vtbl
=
{
/* IUnknown */
...
...
@@ -4508,5 +4528,6 @@ const IWineD3DSurfaceVtbl IWineD3DSurface_Vtbl =
IWineD3DSurfaceImpl_PrivateSetup
,
IWineD3DSurfaceImpl_ModifyLocation
,
IWineD3DSurfaceImpl_LoadLocation
,
IWineD3DSurfaceImpl_GetImplType
IWineD3DSurfaceImpl_GetImplType
,
IWineD3DSurfaceImpl_DrawOverlay
};
dlls/wined3d/surface_base.c
View file @
fad3f9ba
...
...
@@ -374,6 +374,8 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetOverlayPosition(IWineD3DSurface *iface
This
->
overlay_destrect
.
right
=
X
+
w
;
This
->
overlay_destrect
.
bottom
=
Y
+
h
;
IWineD3DSurface_DrawOverlay
(
iface
);
return
WINED3D_OK
;
}
...
...
@@ -419,7 +421,7 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_UpdateOverlayZOrder(IWineD3DSurface *ifac
HRESULT
WINAPI
IWineD3DBaseSurfaceImpl_UpdateOverlay
(
IWineD3DSurface
*
iface
,
RECT
*
SrcRect
,
IWineD3DSurface
*
DstSurface
,
RECT
*
DstRect
,
DWORD
Flags
,
WINEDDOVERLAYFX
*
FX
)
{
IWineD3DSurfaceImpl
*
This
=
(
IWineD3DSurfaceImpl
*
)
iface
;
IWineD3DSurfaceImpl
*
Dst
=
(
IWineD3DSurfaceImpl
*
)
DstSurface
;
FIXM
E
(
"(%p)->(%p, %p, %p, %08x, %p)
\n
"
,
This
,
SrcRect
,
Dst
,
DstRect
,
Flags
,
FX
);
TRAC
E
(
"(%p)->(%p, %p, %p, %08x, %p)
\n
"
,
This
,
SrcRect
,
Dst
,
DstRect
,
Flags
,
FX
);
if
(
!
(
This
->
resource
.
usage
&
WINED3DUSAGE_OVERLAY
))
{
...
...
@@ -460,6 +462,8 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_UpdateOverlay(IWineD3DSurface *iface, REC
This
->
overlay_dest
=
NULL
;
}
IWineD3DSurface_DrawOverlay
(
iface
);
return
WINED3D_OK
;
}
...
...
dlls/wined3d/surface_gdi.c
View file @
fad3f9ba
...
...
@@ -801,6 +801,11 @@ 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.
*/
...
...
@@ -860,5 +865,6 @@ const IWineD3DSurfaceVtbl IWineGDISurface_Vtbl =
IWineGDISurfaceImpl_PrivateSetup
,
IWineGDISurfaceImpl_ModifyLocation
,
IWineGDISurfaceImpl_LoadLocation
,
IWineGDISurfaceImpl_GetImplType
IWineGDISurfaceImpl_GetImplType
,
IWineGDISurfaceImpl_DrawOverlay
};
include/wine/wined3d_interface.h
View file @
fad3f9ba
...
...
@@ -1175,6 +1175,7 @@ DECLARE_INTERFACE_(IWineD3DSurface,IWineD3DResource)
STDMETHOD_
(
void
,
ModifyLocation
)(
THIS_
DWORD
flag
,
BOOL
persistent
);
STDMETHOD
(
LoadLocation
)(
THIS_
DWORD
flag
,
const
RECT
*
rect
);
STDMETHOD_
(
WINED3DSURFTYPE
,
GetImplType
)(
THIS
);
STDMETHOD
(
DrawOverlay
)(
THIS
);
};
#undef INTERFACE
...
...
@@ -1235,6 +1236,7 @@ DECLARE_INTERFACE_(IWineD3DSurface,IWineD3DResource)
#define IWineD3DSurface_ModifyLocation(p,a,b) (p)->lpVtbl->ModifyLocation(p,a,b)
#define IWineD3DSurface_LoadLocation(p,a,b) (p)->lpVtbl->LoadLocation(p,a,b)
#define IWineD3DSurface_GetImplType(p) (p)->lpVtbl->GetImplType(p)
#define IWineD3DSurface_DrawOverlay(p) (p)->lpVtbl->DrawOverlay(p)
#endif
/*****************************************************************************
...
...
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