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
96658847
Commit
96658847
authored
Jan 14, 2014
by
Stefan Dösinger
Committed by
Alexandre Julliard
Jan 14, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Don't map the surface in getdc.
This avoids bouncing the content between the map binding and DIB.
parent
adf0ab2a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
11 deletions
+2
-11
surface.c
dlls/wined3d/surface.c
+2
-11
No files found.
dlls/wined3d/surface.c
View file @
96658847
...
@@ -3219,7 +3219,6 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
...
@@ -3219,7 +3219,6 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
HRESULT
CDECL
wined3d_surface_getdc
(
struct
wined3d_surface
*
surface
,
HDC
*
dc
)
HRESULT
CDECL
wined3d_surface_getdc
(
struct
wined3d_surface
*
surface
,
HDC
*
dc
)
{
{
struct
wined3d_map_desc
map
;
HRESULT
hr
;
HRESULT
hr
;
TRACE
(
"surface %p, dc %p.
\n
"
,
surface
,
dc
);
TRACE
(
"surface %p, dc %p.
\n
"
,
surface
,
dc
);
...
@@ -3245,14 +3244,6 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
...
@@ -3245,14 +3244,6 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
return
WINED3DERR_INVALIDCALL
;
return
WINED3DERR_INVALIDCALL
;
}
}
/* Map the surface. */
hr
=
wined3d_surface_map
(
surface
,
&
map
,
NULL
,
0
);
if
(
FAILED
(
hr
))
{
ERR
(
"Map failed, hr %#x.
\n
"
,
hr
);
return
hr
;
}
surface_load_location
(
surface
,
SFLAG_INDIB
);
surface_load_location
(
surface
,
SFLAG_INDIB
);
surface_invalidate_location
(
surface
,
~
SFLAG_INDIB
);
surface_invalidate_location
(
surface
,
~
SFLAG_INDIB
);
...
@@ -3294,6 +3285,7 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
...
@@ -3294,6 +3285,7 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
}
}
surface
->
flags
|=
SFLAG_DCINUSE
;
surface
->
flags
|=
SFLAG_DCINUSE
;
surface
->
resource
.
map_count
++
;
*
dc
=
surface
->
hDC
;
*
dc
=
surface
->
hDC
;
TRACE
(
"Returning dc %p.
\n
"
,
*
dc
);
TRACE
(
"Returning dc %p.
\n
"
,
*
dc
);
...
@@ -3315,8 +3307,7 @@ HRESULT CDECL wined3d_surface_releasedc(struct wined3d_surface *surface, HDC dc)
...
@@ -3315,8 +3307,7 @@ HRESULT CDECL wined3d_surface_releasedc(struct wined3d_surface *surface, HDC dc)
return
WINEDDERR_NODC
;
return
WINEDDERR_NODC
;
}
}
wined3d_surface_unmap
(
surface
);
surface
->
resource
.
map_count
--
;
surface
->
flags
&=
~
SFLAG_DCINUSE
;
surface
->
flags
&=
~
SFLAG_DCINUSE
;
if
(
surface
->
map_binding
==
SFLAG_INUSERMEM
)
if
(
surface
->
map_binding
==
SFLAG_INUSERMEM
)
...
...
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