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
12374491
Commit
12374491
authored
Sep 25, 2007
by
Stefan Dösinger
Committed by
Alexandre Julliard
Oct 26, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Add a method for surface location updates.
parent
dcff7dc2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
60 additions
and
2 deletions
+60
-2
surface.c
dlls/wined3d/surface.c
+47
-1
surface_gdi.c
dlls/wined3d/surface_gdi.c
+11
-1
wined3d_interface.h
include/wine/wined3d_interface.h
+2
-0
No files found.
dlls/wined3d/surface.c
View file @
12374491
...
...
@@ -3549,6 +3549,51 @@ static void WINAPI IWineD3DSurfaceImpl_ModifyLocation(IWineD3DSurface *iface, DW
}
}
static
HRESULT
WINAPI
IWineD3DSurfaceImpl_LoadLocation
(
IWineD3DSurface
*
iface
,
DWORD
flag
,
const
RECT
*
rect
)
{
IWineD3DSurfaceImpl
*
This
=
(
IWineD3DSurfaceImpl
*
)
iface
;
TRACE
(
"(%p)->(%s, %p)
\n
"
,
iface
,
flag
==
SFLAG_INSYSMEM
?
"SFLAG_INSYSMEM"
:
flag
==
SFLAG_INDRAWABLE
?
"SFLAG_INDRAWABLE"
:
"SFLAG_INTEXTURE"
,
rect
);
if
(
rect
)
{
TRACE
(
"Rectangle: (%d,%d)-(%d,%d)
\n
"
,
rect
->
left
,
rect
->
top
,
rect
->
right
,
rect
->
bottom
);
}
/* TODO: For fbo targets, texture == drawable */
if
(
This
->
Flags
&
flag
)
{
TRACE
(
"Location already up to date
\n
"
);
return
WINED3D_OK
;
}
if
(
!
(
This
->
Flags
&
SFLAG_LOCATIONS
))
{
ERR
(
"Surface does not have any up to date location
\n
"
);
This
->
Flags
|=
SFLAG_LOST
;
return
WINED3DERR_DEVICELOST
;
}
if
(
flag
==
SFLAG_INSYSMEM
)
{
/* Download the surface to system memory */
if
(
This
->
Flags
&
SFLAG_INTEXTURE
)
{
/* Download texture to sysmem */
}
else
{
/* Download drawable to sysmem */
}
}
else
if
(
flag
==
SFLAG_INDRAWABLE
)
{
if
(
This
->
Flags
&
SFLAG_INTEXTURE
)
{
/* Blit texture to drawable */
}
else
{
/* Load drawable from sysmem */
}
}
else
/* if(flag == SFLAG_INTEXTURE) */
{
if
(
This
->
Flags
&
SFLAG_INDRAWABLE
)
{
/* glCopyTexImage the drawable into the texture */
}
else
{
/* Load the texture from sysmem */
}
}
return
WINED3D_OK
;
}
const
IWineD3DSurfaceVtbl
IWineD3DSurface_Vtbl
=
{
/* IUnknown */
...
...
@@ -3601,5 +3646,6 @@ const IWineD3DSurfaceVtbl IWineD3DSurface_Vtbl =
IWineD3DSurfaceImpl_GetData
,
IWineD3DSurfaceImpl_SetFormat
,
IWineD3DSurfaceImpl_PrivateSetup
,
IWineD3DSurfaceImpl_ModifyLocation
IWineD3DSurfaceImpl_ModifyLocation
,
IWineD3DSurfaceImpl_LoadLocation
};
dlls/wined3d/surface_gdi.c
View file @
12374491
...
...
@@ -796,6 +796,15 @@ static void WINAPI IWineGDISurfaceImpl_ModifyLocation(IWineD3DSurface *iface, DW
}
}
static
HRESULT
WINAPI
IWineGDISurfaceImpl_LoadLocation
(
IWineD3DSurface
*
iface
,
DWORD
flag
,
const
RECT
*
rect
)
{
if
(
flag
!=
SFLAG_INSYSMEM
)
{
ERR
(
"GDI Surface requested to be copied to gl %s
\n
"
,
flag
==
SFLAG_INTEXTURE
?
"texture"
:
"drawable"
);
}
else
{
TRACE
(
"Surface requested in surface memory
\n
"
);
}
return
WINED3D_OK
;
}
/* FIXME: This vtable should not use any IWineD3DSurface* implementation functions,
* only IWineD3DBaseSurface and IWineGDISurface ones.
*/
...
...
@@ -851,5 +860,6 @@ const IWineD3DSurfaceVtbl IWineGDISurface_Vtbl =
IWineD3DSurfaceImpl_GetData
,
IWineD3DBaseSurfaceImpl_SetFormat
,
IWineGDISurfaceImpl_PrivateSetup
,
IWineGDISurfaceImpl_ModifyLocation
IWineGDISurfaceImpl_ModifyLocation
,
IWineGDISurfaceImpl_LoadLocation
};
include/wine/wined3d_interface.h
View file @
12374491
...
...
@@ -1142,6 +1142,7 @@ DECLARE_INTERFACE_(IWineD3DSurface,IWineD3DResource)
STDMETHOD
(
SetFormat
)(
THIS_
WINED3DFORMAT
format
)
PURE
;
STDMETHOD
(
PrivateSetup
)(
THIS
)
PURE
;
STDMETHOD_
(
void
,
ModifyLocation
)(
THIS_
DWORD
flag
,
BOOL
persistent
);
STDMETHOD
(
LoadLocation
)(
THIS_
DWORD
flag
,
const
RECT
*
rect
);
};
#undef INTERFACE
...
...
@@ -1198,6 +1199,7 @@ DECLARE_INTERFACE_(IWineD3DSurface,IWineD3DResource)
#define IWineD3DSurface_SetFormat(p,a) (p)->lpVtbl->SetFormat(p,a)
#define IWineD3DSurface_PrivateSetup(p) (p)->lpVtbl->PrivateSetup(p)
#define IWineD3DSurface_ModifyLocation(p,a,b) (p)->lpVtbl->ModifyLocation(p,a,b)
#define IWineD3DSurface_LoadLocation(p,a,b) (p)->lpVtbl->LoadLocation(p,a,b)
#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