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
147f24dd
Commit
147f24dd
authored
Jul 21, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Jul 22, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Remove ModifyLocation() from the public wined3d surface interface.
parent
ab418fc2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
81 additions
and
78 deletions
+81
-78
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+1
-1
context.c
dlls/wined3d/context.c
+1
-1
cubetexture.c
dlls/wined3d/cubetexture.c
+1
-1
device.c
dlls/wined3d/device.c
+5
-5
drawprim.c
dlls/wined3d/drawprim.c
+4
-4
surface.c
dlls/wined3d/surface.c
+57
-42
surface_gdi.c
dlls/wined3d/surface_gdi.c
+0
-11
swapchain.c
dlls/wined3d/swapchain.c
+10
-8
texture.c
dlls/wined3d/texture.c
+1
-1
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-0
wined3d.idl
include/wine/wined3d.idl
+0
-4
No files found.
dlls/wined3d/arb_program_shader.c
View file @
147f24dd
...
...
@@ -7166,7 +7166,7 @@ HRESULT arbfp_blit_surface(IWineD3DDeviceImpl *device, IWineD3DSurfaceImpl *src_
context_release
(
context
);
IWineD3DSurface_ModifyLocation
((
IWineD3DSurface
*
)
dst_surface
,
SFLAG_INDRAWABLE
,
TRUE
);
surface_modify_location
(
dst_surface
,
SFLAG_INDRAWABLE
,
TRUE
);
return
WINED3D_OK
;
}
...
...
dlls/wined3d/context.c
View file @
147f24dd
...
...
@@ -2224,7 +2224,7 @@ static void context_setup_target(IWineD3DDeviceImpl *device,
surface_internal_preload
(
context
->
current_rt
,
SRGB_RGB
);
}
IWineD3DSurface_ModifyLocation
((
IWineD3DSurface
*
)
context
->
current_rt
,
SFLAG_INDRAWABLE
,
FALSE
);
surface_modify_location
(
context
->
current_rt
,
SFLAG_INDRAWABLE
,
FALSE
);
device
->
isInDraw
=
oldInDraw
;
}
...
...
dlls/wined3d/cubetexture.c
View file @
147f24dd
...
...
@@ -84,7 +84,7 @@ static void cubetexture_internal_preload(IWineD3DBaseTexture *iface, enum WINED3
IWineD3DSurface_LoadLocation
((
IWineD3DSurface
*
)
surface
,
SFLAG_INSYSMEM
,
NULL
);
/* Make sure the texture is reloaded because of the palette change,
* this kills performance though :( */
IWineD3DSurface_ModifyLocation
((
IWineD3DSurface
*
)
surface
,
SFLAG_INTEXTURE
,
FALSE
);
surface_modify_location
(
surface
,
SFLAG_INTEXTURE
,
FALSE
);
}
}
}
...
...
dlls/wined3d/device.c
View file @
147f24dd
...
...
@@ -4485,7 +4485,7 @@ HRESULT IWineD3DDeviceImpl_ClearSurface(IWineD3DDeviceImpl *This, IWineD3DSurfac
if
(
location
==
SFLAG_DS_ONSCREEN
&&
depth_stencil
!=
This
->
onscreen_depth_stencil
)
device_switch_onscreen_ds
(
This
,
context
,
depth_stencil
);
prepare_ds_clear
(
depth_stencil
,
context
,
location
,
&
draw_rect
,
Count
,
clear_rect
);
IWineD3DSurface_ModifyLocation
((
IWineD3DSurface
*
)
depth_stencil
,
SFLAG_INDRAWABLE
,
TRUE
);
surface_modify_location
(
depth_stencil
,
SFLAG_INDRAWABLE
,
TRUE
);
glDepthMask
(
GL_TRUE
);
IWineD3DDeviceImpl_MarkStateDirty
(
This
,
STATE_RENDER
(
WINED3DRS_ZWRITEENABLE
));
...
...
@@ -4496,7 +4496,7 @@ HRESULT IWineD3DDeviceImpl_ClearSurface(IWineD3DDeviceImpl *This, IWineD3DSurfac
if
(
Flags
&
WINED3DCLEAR_TARGET
)
{
IWineD3DSurface_ModifyLocation
((
IWineD3DSurface
*
)
target
,
SFLAG_INDRAWABLE
,
TRUE
);
surface_modify_location
(
target
,
SFLAG_INDRAWABLE
,
TRUE
);
glColorMask
(
GL_TRUE
,
GL_TRUE
,
GL_TRUE
,
GL_TRUE
);
IWineD3DDeviceImpl_MarkStateDirty
(
This
,
STATE_RENDER
(
WINED3DRS_COLORWRITEENABLE
));
...
...
@@ -5353,7 +5353,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_UpdateSurface(IWineD3DDevice *iface,
LEAVE_GL
();
context_release
(
context
);
IWineD3DSurface_ModifyLocation
(
dst_surface
,
SFLAG_INTEXTURE
,
TRUE
);
surface_modify_location
(
dst_impl
,
SFLAG_INTEXTURE
,
TRUE
);
sampler
=
This
->
rev_tex_unit_map
[
0
];
if
(
sampler
!=
WINED3D_UNMAPPED_STAGE
)
{
...
...
@@ -5490,7 +5490,7 @@ static void color_fill_fbo(IWineD3DDevice *iface, IWineD3DSurfaceImpl *surface,
struct
wined3d_context
*
context
;
if
(
rect
)
IWineD3DSurface_LoadLocation
((
IWineD3DSurface
*
)
surface
,
SFLAG_INDRAWABLE
,
NULL
);
IWineD3DSurface_ModifyLocation
((
IWineD3DSurface
*
)
surface
,
SFLAG_INDRAWABLE
,
TRUE
);
surface_modify_location
(
surface
,
SFLAG_INDRAWABLE
,
TRUE
);
context
=
context_acquire
(
This
,
surface
);
context_apply_clear_state
(
context
,
This
,
surface
,
NULL
);
...
...
@@ -5848,7 +5848,7 @@ void stretch_rect_fbo(IWineD3DDeviceImpl *device, IWineD3DSurfaceImpl *src_surfa
context_release
(
context
);
IWineD3DSurface_ModifyLocation
((
IWineD3DSurface
*
)
dst_surface
,
SFLAG_INDRAWABLE
,
TRUE
);
surface_modify_location
(
dst_surface
,
SFLAG_INDRAWABLE
,
TRUE
);
}
static
HRESULT
WINAPI
IWineD3DDeviceImpl_SetRenderTarget
(
IWineD3DDevice
*
iface
,
DWORD
RenderTargetIndex
,
IWineD3DSurface
*
pRenderTarget
,
...
...
dlls/wined3d/drawprim.c
View file @
147f24dd
...
...
@@ -583,11 +583,11 @@ void drawPrimitive(IWineD3DDevice *iface, UINT index_count, UINT StartIdx, UINT
/* Invalidate the back buffer memory so LockRect will read it the next time */
for
(
i
=
0
;
i
<
This
->
adapter
->
gl_info
.
limits
.
buffers
;
++
i
)
{
IWineD3DSurface
*
target
=
(
IWineD3DSurface
*
)
This
->
render_targets
[
i
];
IWineD3DSurface
Impl
*
target
=
This
->
render_targets
[
i
];
if
(
target
)
{
IWineD3DSurface_LoadLocation
(
target
,
SFLAG_INDRAWABLE
,
NULL
);
IWineD3DSurface_ModifyL
ocation
(
target
,
SFLAG_INDRAWABLE
,
TRUE
);
IWineD3DSurface_LoadLocation
(
(
IWineD3DSurface
*
)
target
,
SFLAG_INDRAWABLE
,
NULL
);
surface_modify_l
ocation
(
target
,
SFLAG_INDRAWABLE
,
TRUE
);
}
}
}
...
...
@@ -639,7 +639,7 @@ void drawPrimitive(IWineD3DDevice *iface, UINT index_count, UINT StartIdx, UINT
surface_modify_ds_location
(
This
->
depth_stencil
,
location
,
This
->
depth_stencil
->
ds_current_size
.
cx
,
This
->
depth_stencil
->
ds_current_size
.
cy
);
IWineD3DSurface_ModifyLocation
((
IWineD3DSurface
*
)
This
->
depth_stencil
,
SFLAG_INDRAWABLE
,
TRUE
);
surface_modify_location
(
This
->
depth_stencil
,
SFLAG_INDRAWABLE
,
TRUE
);
}
}
}
...
...
dlls/wined3d/surface.c
View file @
147f24dd
This diff is collapsed.
Click to expand it.
dlls/wined3d/surface_gdi.c
View file @
147f24dd
...
...
@@ -477,16 +477,6 @@ static HRESULT WINAPI IWineGDISurfaceImpl_SetMem(IWineD3DSurface *iface, void *M
/***************************
*
***************************/
static
void
WINAPI
IWineGDISurfaceImpl_ModifyLocation
(
IWineD3DSurface
*
iface
,
DWORD
flag
,
BOOL
persistent
)
{
TRACE
(
"(%p)->(%s, %s)
\n
"
,
iface
,
flag
==
SFLAG_INSYSMEM
?
"SFLAG_INSYSMEM"
:
flag
==
SFLAG_INDRAWABLE
?
"SFLAG_INDRAWABLE"
:
"SFLAG_INTEXTURE"
,
persistent
?
"TRUE"
:
"FALSE"
);
/* GDI surfaces can be in system memory only */
if
(
flag
!=
SFLAG_INSYSMEM
)
{
ERR
(
"GDI Surface requested in gl %s memory
\n
"
,
flag
==
SFLAG_INDRAWABLE
?
"drawable"
:
"texture"
);
}
}
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"
);
...
...
@@ -557,7 +547,6 @@ const IWineD3DSurfaceVtbl IWineGDISurface_Vtbl =
IWineD3DBaseSurfaceImpl_GetData
,
IWineD3DBaseSurfaceImpl_SetFormat
,
IWineGDISurfaceImpl_PrivateSetup
,
IWineGDISurfaceImpl_ModifyLocation
,
IWineGDISurfaceImpl_LoadLocation
,
IWineGDISurfaceImpl_GetImplType
,
IWineGDISurfaceImpl_DrawOverlay
...
...
dlls/wined3d/swapchain.c
View file @
147f24dd
...
...
@@ -326,7 +326,7 @@ static HRESULT WINAPI IWineD3DSwapChainImpl_Present(IWineD3DSwapChain *iface, CO
if
(
!
This
->
render_to_fbo
&&
render_to_fbo
&&
wined3d_settings
.
offscreen_rendering_mode
==
ORM_FBO
)
{
IWineD3DSurface_LoadLocation
((
IWineD3DSurface
*
)
This
->
back_buffers
[
0
],
SFLAG_INTEXTURE
,
NULL
);
IWineD3DSurface_ModifyLocation
((
IWineD3DSurface
*
)
This
->
back_buffers
[
0
],
SFLAG_INDRAWABLE
,
FALSE
);
surface_modify_location
(
This
->
back_buffers
[
0
],
SFLAG_INDRAWABLE
,
FALSE
);
This
->
render_to_fbo
=
TRUE
;
/* Force the context manager to update the render target configuration next draw. */
...
...
@@ -408,16 +408,18 @@ static HRESULT WINAPI IWineD3DSwapChainImpl_Present(IWineD3DSwapChain *iface, CO
* This serves to update the emulated overlay, if any
*/
fbflags
=
front
->
Flags
;
IWineD3DSurface_ModifyLocation
((
IWineD3DSurface
*
)
front
,
SFLAG_INDRAWABLE
,
TRUE
);
surface_modify_location
(
front
,
SFLAG_INDRAWABLE
,
TRUE
);
front
->
Flags
=
fbflags
;
}
else
{
IWineD3DSurface_ModifyLocation
((
IWineD3DSurface
*
)
front
,
SFLAG_INDRAWABLE
,
TRUE
);
IWineD3DSurface_ModifyLocation
((
IWineD3DSurface
*
)
back
,
SFLAG_INDRAWABLE
,
TRUE
);
}
else
{
surface_modify_location
(
front
,
SFLAG_INDRAWABLE
,
TRUE
);
surface_modify_location
(
back
,
SFLAG_INDRAWABLE
,
TRUE
);
}
}
else
{
IWineD3DSurface_ModifyLocation
((
IWineD3DSurface
*
)
This
->
front_buffer
,
SFLAG_INDRAWABLE
,
TRUE
);
surface_modify_location
(
This
->
front_buffer
,
SFLAG_INDRAWABLE
,
TRUE
);
/* If the swapeffect is DISCARD, the back buffer is undefined. That means the SYSMEM
* and INTEXTURE copies can keep their old content if they have any defined content.
* If the swapeffect is COPY, the content remains the same. If it is FLIP however,
...
...
@@ -425,7 +427,7 @@ static HRESULT WINAPI IWineD3DSwapChainImpl_Present(IWineD3DSwapChain *iface, CO
*/
if
(
This
->
presentParms
.
SwapEffect
==
WINED3DSWAPEFFECT_FLIP
)
{
IWineD3DSurface_ModifyLocation
((
IWineD3DSurface
*
)
This
->
back_buffers
[
0
],
SFLAG_INDRAWABLE
,
TRUE
);
surface_modify_location
(
This
->
back_buffers
[
0
],
SFLAG_INDRAWABLE
,
TRUE
);
}
}
...
...
@@ -730,7 +732,7 @@ HRESULT swapchain_init(IWineD3DSwapChainImpl *swapchain, WINED3DSURFTYPE surface
swapchain
->
front_buffer
->
Flags
|=
SFLAG_SWAPCHAIN
;
if
(
surface_type
==
SURFACE_OPENGL
)
{
IWineD3DSurface_ModifyLocation
((
IWineD3DSurface
*
)
swapchain
->
front_buffer
,
SFLAG_INDRAWABLE
,
TRUE
);
surface_modify_location
(
swapchain
->
front_buffer
,
SFLAG_INDRAWABLE
,
TRUE
);
}
/* MSDN says we're only allowed a single fullscreen swapchain per device,
...
...
dlls/wined3d/texture.c
View file @
147f24dd
...
...
@@ -78,7 +78,7 @@ static void texture_internal_preload(IWineD3DBaseTexture *iface, enum WINED3DSRG
/* TODO: This is not necessarily needed with hw palettized texture support. */
IWineD3DSurface_LoadLocation
((
IWineD3DSurface
*
)
surface
,
SFLAG_INSYSMEM
,
NULL
);
/* Make sure the texture is reloaded because of the palette change, this kills performance though :( */
IWineD3DSurface_ModifyLocation
((
IWineD3DSurface
*
)
surface
,
SFLAG_INTEXTURE
,
FALSE
);
surface_modify_location
(
surface
,
SFLAG_INTEXTURE
,
FALSE
);
}
}
}
...
...
dlls/wined3d/wined3d_private.h
View file @
147f24dd
...
...
@@ -2077,6 +2077,7 @@ BOOL surface_is_offscreen(IWineD3DSurfaceImpl *iface) DECLSPEC_HIDDEN;
void
surface_load_ds_location
(
IWineD3DSurfaceImpl
*
surface
,
struct
wined3d_context
*
context
,
DWORD
location
)
DECLSPEC_HIDDEN
;
void
surface_modify_ds_location
(
IWineD3DSurfaceImpl
*
surface
,
DWORD
location
,
UINT
w
,
UINT
h
)
DECLSPEC_HIDDEN
;
void
surface_modify_location
(
IWineD3DSurfaceImpl
*
surface
,
DWORD
flag
,
BOOL
persistent
)
DECLSPEC_HIDDEN
;
void
surface_prepare_texture
(
IWineD3DSurfaceImpl
*
surface
,
const
struct
wined3d_gl_info
*
gl_info
,
BOOL
srgb
)
DECLSPEC_HIDDEN
;
void
surface_set_compatible_renderbuffer
(
IWineD3DSurfaceImpl
*
surface
,
...
...
include/wine/wined3d.idl
View file @
147f24dd
...
...
@@ -2491,10 +2491,6 @@ interface IWineD3DSurface : IWineD3DResource
)
;
HRESULT
PrivateSetup
(
)
;
void
ModifyLocation
(
[
in
]
DWORD
location
,
[
in
]
BOOL
persistent
)
;
HRESULT
LoadLocation
(
[
in
]
DWORD
location
,
[
in
]
const
RECT
*
rect
...
...
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