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
9440dfed
Commit
9440dfed
authored
Jan 14, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Jan 14, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Remove AddDirtyRect() from the public interface.
parent
fd900216
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
49 additions
and
56 deletions
+49
-56
cubetexture.c
dlls/wined3d/cubetexture.c
+5
-5
device.c
dlls/wined3d/device.c
+1
-1
surface.c
dlls/wined3d/surface.c
+38
-36
surface_gdi.c
dlls/wined3d/surface_gdi.c
+0
-9
texture.c
dlls/wined3d/texture.c
+4
-2
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-0
wined3d.idl
include/wine/wined3d.idl
+0
-3
No files found.
dlls/wined3d/cubetexture.c
View file @
9440dfed
...
...
@@ -136,9 +136,8 @@ static void WINAPI IWineD3DCubeTextureImpl_PreLoad(IWineD3DCubeTexture *iface) {
}
}
}
else
if
(
srgb_was_toggled
)
{
/* Loop is repeated in the else block with the extra AddDirtyRect line to avoid the alternative of
* checking srgb_was_toggled in every iteration, even when the texture is just dirty
*/
/* Loop is repeated in the else block with the extra surface_add_dirty_rect() line to avoid the
* alternative of checking srgb_was_toggled in every iteration, even when the texture is just dirty */
if
(
This
->
baseTexture
.
srgb_mode_change_count
<
20
)
++
This
->
baseTexture
.
srgb_mode_change_count
;
else
...
...
@@ -146,7 +145,7 @@ static void WINAPI IWineD3DCubeTextureImpl_PreLoad(IWineD3DCubeTexture *iface) {
for
(
i
=
0
;
i
<
This
->
baseTexture
.
levels
;
i
++
)
{
for
(
j
=
WINED3DCUBEMAP_FACE_POSITIVE_X
;
j
<=
WINED3DCUBEMAP_FACE_NEGATIVE_Z
;
j
++
)
{
IWineD3DSurface_AddDirtyR
ect
(
This
->
surfaces
[
j
][
i
],
NULL
);
surface_add_dirty_r
ect
(
This
->
surfaces
[
j
][
i
],
NULL
);
surface_force_reload
(
This
->
surfaces
[
j
][
i
]);
IWineD3DSurface_LoadTexture
(
This
->
surfaces
[
j
][
i
],
srgb_mode
);
}
...
...
@@ -360,7 +359,8 @@ static HRESULT WINAPI IWineD3DCubeTextureImpl_AddDirtyRect(IWineD3DCubeTexture
This
->
baseTexture
.
dirty
=
TRUE
;
TRACE
(
"(%p) : dirtyfication of faceType(%d) Level (0)
\n
"
,
This
,
FaceType
);
if
(
FaceType
<=
WINED3DCUBEMAP_FACE_NEGATIVE_Z
)
{
hr
=
IWineD3DSurface_AddDirtyRect
(
This
->
surfaces
[
FaceType
][
0
],
pDirtyRect
);
surface_add_dirty_rect
(
This
->
surfaces
[
FaceType
][
0
],
pDirtyRect
);
hr
=
WINED3D_OK
;
}
else
{
WARN
(
"(%p) overflow FaceType(%d)
\n
"
,
This
,
FaceType
);
}
...
...
dlls/wined3d/device.c
View file @
9440dfed
...
...
@@ -764,7 +764,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateSurface(IWineD3DDevice *iface, U
}
/* mark the texture as dirty so that it gets loaded first time around*/
IWineD3DSurface_AddDirtyR
ect
(
*
ppSurface
,
NULL
);
surface_add_dirty_r
ect
(
*
ppSurface
,
NULL
);
TRACE
(
"(%p) : w(%d) h(%d) fmt(%d,%s) lockable(%d) surf@%p, surfmem@%p, %d bytes
\n
"
,
This
,
Width
,
Height
,
Format
,
debug_d3dformat
(
Format
),
(
WINED3DFMT_D16_LOCKABLE
==
Format
),
*
ppSurface
,
object
->
resource
.
allocatedMemory
,
object
->
resource
.
size
);
...
...
dlls/wined3d/surface.c
View file @
9440dfed
...
...
@@ -476,6 +476,43 @@ GLenum surface_get_gl_buffer(IWineD3DSurface *iface, IWineD3DSwapChain *swapchai
return
GL_BACK
;
}
/* Slightly inefficient way to handle multiple dirty rects but it works :) */
void
surface_add_dirty_rect
(
IWineD3DSurface
*
iface
,
const
RECT
*
dirty_rect
)
{
IWineD3DSurfaceImpl
*
This
=
(
IWineD3DSurfaceImpl
*
)
iface
;
IWineD3DBaseTexture
*
baseTexture
=
NULL
;
if
(
!
(
This
->
Flags
&
SFLAG_INSYSMEM
)
&&
(
This
->
Flags
&
SFLAG_INTEXTURE
))
IWineD3DSurface_LoadLocation
(
iface
,
SFLAG_INSYSMEM
,
NULL
/* no partial locking for textures yet */
);
IWineD3DSurface_ModifyLocation
(
iface
,
SFLAG_INSYSMEM
,
TRUE
);
if
(
dirty_rect
)
{
This
->
dirtyRect
.
left
=
min
(
This
->
dirtyRect
.
left
,
dirty_rect
->
left
);
This
->
dirtyRect
.
top
=
min
(
This
->
dirtyRect
.
top
,
dirty_rect
->
top
);
This
->
dirtyRect
.
right
=
max
(
This
->
dirtyRect
.
right
,
dirty_rect
->
right
);
This
->
dirtyRect
.
bottom
=
max
(
This
->
dirtyRect
.
bottom
,
dirty_rect
->
bottom
);
}
else
{
This
->
dirtyRect
.
left
=
0
;
This
->
dirtyRect
.
top
=
0
;
This
->
dirtyRect
.
right
=
This
->
currentDesc
.
Width
;
This
->
dirtyRect
.
bottom
=
This
->
currentDesc
.
Height
;
}
TRACE
(
"(%p) : Dirty: yes, Rect:(%d, %d, %d, %d)
\n
"
,
This
,
This
->
dirtyRect
.
left
,
This
->
dirtyRect
.
top
,
This
->
dirtyRect
.
right
,
This
->
dirtyRect
.
bottom
);
/* if the container is a basetexture then mark it dirty. */
if
(
SUCCEEDED
(
IWineD3DSurface_GetContainer
(
iface
,
&
IID_IWineD3DBaseTexture
,
(
void
**
)
&
baseTexture
)))
{
TRACE
(
"Passing to container
\n
"
);
IWineD3DBaseTexture_SetDirty
(
baseTexture
,
TRUE
);
IWineD3DBaseTexture_Release
(
baseTexture
);
}
}
static
ULONG
WINAPI
IWineD3DSurfaceImpl_Release
(
IWineD3DSurface
*
iface
)
{
IWineD3DSurfaceImpl
*
This
=
(
IWineD3DSurfaceImpl
*
)
iface
;
...
...
@@ -1193,7 +1230,7 @@ lock_end:
* Dirtify on lock
* as seen in msdn docs
*/
IWineD3DSurface_AddDirtyR
ect
(
iface
,
pRect
);
surface_add_dirty_r
ect
(
iface
,
pRect
);
/** Dirtify Container if needed */
if
(
SUCCEEDED
(
IWineD3DSurface_GetContainer
(
iface
,
&
IID_IWineD3DBaseTexture
,
(
void
**
)
&
pBaseTexture
)))
{
...
...
@@ -2503,40 +2540,6 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_SaveSnapshot(IWineD3DSurface *iface, c
return
WINED3D_OK
;
}
/**
* Slightly inefficient way to handle multiple dirty rects but it works :)
*/
static
HRESULT
WINAPI
IWineD3DSurfaceImpl_AddDirtyRect
(
IWineD3DSurface
*
iface
,
CONST
RECT
*
pDirtyRect
)
{
IWineD3DSurfaceImpl
*
This
=
(
IWineD3DSurfaceImpl
*
)
iface
;
IWineD3DBaseTexture
*
baseTexture
=
NULL
;
if
(
!
(
This
->
Flags
&
SFLAG_INSYSMEM
)
&&
(
This
->
Flags
&
SFLAG_INTEXTURE
))
IWineD3DSurface_LoadLocation
(
iface
,
SFLAG_INSYSMEM
,
NULL
/* no partial locking for textures yet */
);
IWineD3DSurface_ModifyLocation
(
iface
,
SFLAG_INSYSMEM
,
TRUE
);
if
(
NULL
!=
pDirtyRect
)
{
This
->
dirtyRect
.
left
=
min
(
This
->
dirtyRect
.
left
,
pDirtyRect
->
left
);
This
->
dirtyRect
.
top
=
min
(
This
->
dirtyRect
.
top
,
pDirtyRect
->
top
);
This
->
dirtyRect
.
right
=
max
(
This
->
dirtyRect
.
right
,
pDirtyRect
->
right
);
This
->
dirtyRect
.
bottom
=
max
(
This
->
dirtyRect
.
bottom
,
pDirtyRect
->
bottom
);
}
else
{
This
->
dirtyRect
.
left
=
0
;
This
->
dirtyRect
.
top
=
0
;
This
->
dirtyRect
.
right
=
This
->
currentDesc
.
Width
;
This
->
dirtyRect
.
bottom
=
This
->
currentDesc
.
Height
;
}
TRACE
(
"(%p) : Dirty: yes, Rect:(%d,%d,%d,%d)
\n
"
,
This
,
This
->
dirtyRect
.
left
,
This
->
dirtyRect
.
top
,
This
->
dirtyRect
.
right
,
This
->
dirtyRect
.
bottom
);
/* if the container is a basetexture then mark it dirty. */
if
(
IWineD3DSurface_GetContainer
(
iface
,
&
IID_IWineD3DBaseTexture
,
(
void
**
)
&
baseTexture
)
==
WINED3D_OK
)
{
TRACE
(
"Passing to container
\n
"
);
IWineD3DBaseTexture_SetDirty
(
baseTexture
,
TRUE
);
IWineD3DBaseTexture_Release
(
baseTexture
);
}
return
WINED3D_OK
;
}
static
HRESULT
WINAPI
IWineD3DSurfaceImpl_SetFormat
(
IWineD3DSurface
*
iface
,
WINED3DFORMAT
format
)
{
IWineD3DSurfaceImpl
*
This
=
(
IWineD3DSurfaceImpl
*
)
iface
;
HRESULT
hr
;
...
...
@@ -4736,7 +4739,6 @@ const IWineD3DSurfaceVtbl IWineD3DSurface_Vtbl =
IWineD3DBaseSurfaceImpl_SetClipper
,
IWineD3DBaseSurfaceImpl_GetClipper
,
/* Internal use: */
IWineD3DSurfaceImpl_AddDirtyRect
,
IWineD3DSurfaceImpl_LoadTexture
,
IWineD3DSurfaceImpl_BindTexture
,
IWineD3DSurfaceImpl_SaveSnapshot
,
...
...
dlls/wined3d/surface_gdi.c
View file @
9440dfed
...
...
@@ -540,14 +540,6 @@ static void WINAPI IWineGDISurfaceImpl_GetGlDesc(IWineD3DSurface *iface, glDescr
*
glDescription
=
NULL
;
}
static
HRESULT
WINAPI
IWineGDISurfaceImpl_AddDirtyRect
(
IWineD3DSurface
*
iface
,
CONST
RECT
*
pDirtyRect
)
{
/* GDI surface data can only be in one location, the system memory dib section. So they are
* always clean by definition.
*/
TRACE
(
"No dirtification in GDI surfaces
\n
"
);
return
WINED3D_OK
;
}
static
HRESULT
WINAPI
IWineGDISurfaceImpl_SetMem
(
IWineD3DSurface
*
iface
,
void
*
Mem
)
{
IWineD3DSurfaceImpl
*
This
=
(
IWineD3DSurfaceImpl
*
)
iface
;
...
...
@@ -673,7 +665,6 @@ const IWineD3DSurfaceVtbl IWineGDISurface_Vtbl =
IWineD3DBaseSurfaceImpl_SetClipper
,
IWineD3DBaseSurfaceImpl_GetClipper
,
/* Internal use: */
IWineGDISurfaceImpl_AddDirtyRect
,
IWineGDISurfaceImpl_LoadTexture
,
IWineD3DBaseSurfaceImpl_BindTexture
,
IWineGDISurfaceImpl_SaveSnapshot
,
...
...
dlls/wined3d/texture.c
View file @
9440dfed
...
...
@@ -137,7 +137,7 @@ static void WINAPI IWineD3DTextureImpl_PreLoad(IWineD3DTexture *iface) {
FIXME
(
"Texture (%p) has been reloaded at least 20 times due to WINED3DSAMP_SRGBTEXTURE changes on it
\'
s sampler
\n
"
,
This
);
for
(
i
=
0
;
i
<
This
->
baseTexture
.
levels
;
i
++
)
{
IWineD3DSurface_AddDirtyR
ect
(
This
->
surfaces
[
i
],
NULL
);
surface_add_dirty_r
ect
(
This
->
surfaces
[
i
],
NULL
);
surface_force_reload
(
This
->
surfaces
[
i
]);
IWineD3DSurface_LoadTexture
(
This
->
surfaces
[
i
],
srgb_mode
);
}
...
...
@@ -360,7 +360,9 @@ static HRESULT WINAPI IWineD3DTextureImpl_AddDirtyRect(IWineD3DTexture *iface, C
IWineD3DTextureImpl
*
This
=
(
IWineD3DTextureImpl
*
)
iface
;
This
->
baseTexture
.
dirty
=
TRUE
;
TRACE
(
"(%p) : dirtyfication of surface Level (0)
\n
"
,
This
);
return
IWineD3DSurface_AddDirtyRect
(
This
->
surfaces
[
0
],
pDirtyRect
);
surface_add_dirty_rect
(
This
->
surfaces
[
0
],
pDirtyRect
);
return
WINED3D_OK
;
}
const
IWineD3DTextureVtbl
IWineD3DTexture_Vtbl
=
...
...
dlls/wined3d/wined3d_private.h
View file @
9440dfed
...
...
@@ -2038,6 +2038,7 @@ void state_fogdensity(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DCo
void
state_fogstartend
(
DWORD
state
,
IWineD3DStateBlockImpl
*
stateblock
,
WineD3DContext
*
context
);
void
state_fog_fragpart
(
DWORD
state
,
IWineD3DStateBlockImpl
*
stateblock
,
WineD3DContext
*
context
);
void
surface_add_dirty_rect
(
IWineD3DSurface
*
iface
,
const
RECT
*
dirty_rect
);
void
surface_force_reload
(
IWineD3DSurface
*
iface
);
GLenum
surface_get_gl_buffer
(
IWineD3DSurface
*
iface
,
IWineD3DSwapChain
*
swapchain
);
void
surface_load_ds_location
(
IWineD3DSurface
*
iface
,
DWORD
location
);
...
...
include/wine/wined3d.idl
View file @
9440dfed
...
...
@@ -2453,9 +2453,6 @@ interface IWineD3DSurface : IWineD3DResource
HRESULT
GetClipper
(
[
out
]
IWineD3DClipper
**
clipper
)
;
HRESULT
AddDirtyRect
(
[
in
]
const
RECT
*
dirty_rect
)
;
HRESULT
LoadTexture
(
[
in
]
BOOL
srgb_mode
)
;
...
...
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