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
5f14ff42
Commit
5f14ff42
authored
Oct 17, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Process the object HDC list outside of the critical section.
parent
2e693d00
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
20 deletions
+17
-20
gdiobj.c
dlls/gdi32/gdiobj.c
+17
-20
No files found.
dlls/gdi32/gdiobj.c
View file @
5f14ff42
...
...
@@ -810,7 +810,7 @@ BOOL WINAPI DeleteObject( HGDIOBJ obj )
{
struct
gdi_handle_entry
*
entry
;
struct
hdc_list
*
hdcs_head
;
const
struct
gdi_obj_funcs
*
funcs
;
const
struct
gdi_obj_funcs
*
funcs
=
NULL
;
EnterCriticalSection
(
&
gdi_section
);
if
(
!
(
entry
=
handle_entry
(
obj
)))
...
...
@@ -826,41 +826,38 @@ BOOL WINAPI DeleteObject( HGDIOBJ obj )
return
TRUE
;
}
while
((
hdcs_head
=
entry
->
hdcs
)
!=
NULL
)
hdcs_head
=
entry
->
hdcs
;
entry
->
hdcs
=
NULL
;
if
(
entry
->
obj
->
selcount
)
{
TRACE
(
"delayed for %p because object in use, count %u
\n
"
,
obj
,
entry
->
obj
->
selcount
);
entry
->
obj
->
deleted
=
1
;
/* mark for delete */
}
else
funcs
=
entry
->
funcs
;
LeaveCriticalSection
(
&
gdi_section
);
while
(
hdcs_head
)
{
struct
hdc_list
*
next
=
hdcs_head
->
next
;
DC
*
dc
=
get_dc_ptr
(
hdcs_head
->
hdc
);
entry
->
hdcs
=
hdcs_head
->
next
;
TRACE
(
"hdc %p has interest in %p
\n
"
,
hdcs_head
->
hdc
,
obj
);
if
(
dc
)
{
PHYSDEV
physdev
=
GET_DC_PHYSDEV
(
dc
,
pDeleteObject
);
LeaveCriticalSection
(
&
gdi_section
);
physdev
->
funcs
->
pDeleteObject
(
physdev
,
obj
);
EnterCriticalSection
(
&
gdi_section
);
/* and grab it again */
entry
=
handle_entry
(
obj
);
release_dc_ptr
(
dc
);
}
HeapFree
(
GetProcessHeap
(),
0
,
hdcs_head
);
if
(
!
entry
)
return
FALSE
;
hdcs_head
=
next
;
}
if
(
entry
->
obj
->
selcount
)
{
TRACE
(
"delayed for %p because object in use, count %u
\n
"
,
obj
,
entry
->
obj
->
selcount
);
entry
->
obj
->
deleted
=
1
;
/* mark for delete */
LeaveCriticalSection
(
&
gdi_section
);
return
TRUE
;
}
funcs
=
entry
->
funcs
;
LeaveCriticalSection
(
&
gdi_section
);
TRACE
(
"%p
\n
"
,
obj
);
if
(
funcs
&&
funcs
->
pDeleteObject
)
return
funcs
->
pDeleteObject
(
obj
);
return
FALS
E
;
return
TRU
E
;
}
/***********************************************************************
...
...
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