Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sebastian Mayr
wine
Commits
43fda1f4
Commit
43fda1f4
authored
17 years ago
by
Stefan Dösinger
Committed by
Alexandre Julliard
17 years ago
Browse files
Options
Downloads
Patches
Plain Diff
wined3d: Only swap system memory resources of front and back buffer if they have the same size.
parent
cf1e01eb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/wined3d/swapchain.c
+45
-40
45 additions, 40 deletions
dlls/wined3d/swapchain.c
with
45 additions
and
40 deletions
dlls/wined3d/swapchain.c
+
45
−
40
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
"
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment