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
43fda1f4
Commit
43fda1f4
authored
May 28, 2007
by
Stefan Dösinger
Committed by
Alexandre Julliard
Jun 14, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Only swap system memory resources of front and back buffer if they have the same size.
parent
cf1e01eb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
40 deletions
+45
-40
swapchain.c
dlls/wined3d/swapchain.c
+45
-40
No files found.
dlls/wined3d/swapchain.c
View file @
43fda1f4
...
...
@@ -321,52 +321,57 @@ static HRESULT WINAPI IWineD3DSwapChainImpl_Present(IWineD3DSwapChain *iface, CO
BOOL
frontuptodate
=
front
->
Flags
&
SFLAG_INSYSMEM
;
BOOL
backuptodate
=
back
->
Flags
&
SFLAG_INSYSMEM
;
/* Flip the DC */
{
HDC
tmp
;
tmp
=
front
->
hDC
;
front
->
hDC
=
back
->
hDC
;
back
->
hDC
=
tmp
;
}
if
(
front
->
resource
.
size
==
back
->
resource
.
size
)
{
/* Flip the DC */
{
HDC
tmp
;
tmp
=
front
->
hDC
;
front
->
hDC
=
back
->
hDC
;
back
->
hDC
=
tmp
;
}
/* Flip the DIBsection */
{
HBITMAP
tmp
;
BOOL
hasDib
=
front
->
Flags
&
SFLAG_DIBSECTION
;
tmp
=
front
->
dib
.
DIBsection
;
front
->
dib
.
DIBsection
=
back
->
dib
.
DIBsection
;
back
->
dib
.
DIBsection
=
tmp
;
if
(
back
->
Flags
&
SFLAG_DIBSECTION
)
front
->
Flags
|=
SFLAG_DIBSECTION
;
else
front
->
Flags
&=
~
SFLAG_DIBSECTION
;
if
(
hasDib
)
back
->
Flags
|=
SFLAG_DIBSECTION
;
else
back
->
Flags
&=
~
SFLAG_DIBSECTION
;
}
/* Flip the DIBsection */
{
HBITMAP
tmp
;
BOOL
hasDib
=
front
->
Flags
&
SFLAG_DIBSECTION
;
tmp
=
front
->
dib
.
DIBsection
;
front
->
dib
.
DIBsection
=
back
->
dib
.
DIBsection
;
back
->
dib
.
DIBsection
=
tmp
;
if
(
back
->
Flags
&
SFLAG_DIBSECTION
)
front
->
Flags
|=
SFLAG_DIBSECTION
;
else
front
->
Flags
&=
~
SFLAG_DIBSECTION
;
if
(
hasDib
)
back
->
Flags
|=
SFLAG_DIBSECTION
;
else
back
->
Flags
&=
~
SFLAG_DIBSECTION
;
}
/* Flip the surface data */
{
void
*
tmp
;
/* Flip the surface data */
{
void
*
tmp
;
tmp
=
front
->
dib
.
bitmap_data
;
front
->
dib
.
bitmap_data
=
back
->
dib
.
bitmap_data
;
back
->
dib
.
bitmap_data
=
tmp
;
tmp
=
front
->
dib
.
bitmap_data
;
front
->
dib
.
bitmap_data
=
back
->
dib
.
bitmap_data
;
back
->
dib
.
bitmap_data
=
tmp
;
tmp
=
front
->
resource
.
allocatedMemory
;
front
->
resource
.
allocatedMemory
=
back
->
resource
.
allocatedMemory
;
back
->
resource
.
allocatedMemory
=
tmp
;
}
tmp
=
front
->
resource
.
allocatedMemory
;
front
->
resource
.
allocatedMemory
=
back
->
resource
.
allocatedMemory
;
back
->
resource
.
allocatedMemory
=
tmp
;
}
/* client_memory should not be different, but just in case */
{
BOOL
tmp
;
tmp
=
front
->
dib
.
client_memory
;
front
->
dib
.
client_memory
=
back
->
dib
.
client_memory
;
back
->
dib
.
client_memory
=
tmp
;
/* client_memory should not be different, but just in case */
{
BOOL
tmp
;
tmp
=
front
->
dib
.
client_memory
;
front
->
dib
.
client_memory
=
back
->
dib
.
client_memory
;
back
->
dib
.
client_memory
=
tmp
;
}
if
(
frontuptodate
)
back
->
Flags
|=
SFLAG_INSYSMEM
;
else
back
->
Flags
&=
~
SFLAG_INSYSMEM
;
if
(
backuptodate
)
front
->
Flags
|=
SFLAG_INSYSMEM
;
else
front
->
Flags
&=
~
SFLAG_INSYSMEM
;
}
else
{
back
->
Flags
&=
~
SFLAG_INSYSMEM
;
front
->
Flags
&=
~
SFLAG_INSYSMEM
;
}
if
(
frontuptodate
)
back
->
Flags
|=
SFLAG_INSYSMEM
;
else
back
->
Flags
&=
~
SFLAG_INSYSMEM
;
if
(
backuptodate
)
front
->
Flags
|=
SFLAG_INSYSMEM
;
else
front
->
Flags
&=
~
SFLAG_INSYSMEM
;
}
TRACE
(
"returning
\n
"
);
...
...
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