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
bf528c5e
Commit
bf528c5e
authored
Aug 21, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Allow removing a driver from the stack based on its function table.
parent
0f5cc668
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
33 deletions
+20
-33
gdi_private.h
dlls/gdi32/gdi_private.h
+4
-3
path.c
dlls/gdi32/path.c
+16
-30
No files found.
dlls/gdi32/gdi_private.h
View file @
bf528c5e
...
...
@@ -170,11 +170,12 @@ static inline INT GDI_ROUND(double val)
#define GET_DC_PHYSDEV(dc,func) \
get_physdev_entry_point( (dc)->physDev, FIELD_OFFSET(struct gdi_dc_funcs,func))
static
inline
PHYSDEV
pop_dc_driver
(
DC
*
dc
,
PHYSDEV
dev
)
static
inline
PHYSDEV
pop_dc_driver
(
DC
*
dc
,
const
struct
gdi_dc_funcs
*
funcs
)
{
PHYSDEV
*
pdev
=
&
dc
->
physDev
;
while
(
*
pdev
&&
*
pdev
!=
dev
)
pdev
=
&
(
*
pdev
)
->
next
;
PHYSDEV
dev
,
*
pdev
=
&
dc
->
physDev
;
while
(
*
pdev
&&
(
*
pdev
)
->
funcs
!=
funcs
)
pdev
=
&
(
*
pdev
)
->
next
;
if
(
!*
pdev
)
return
NULL
;
dev
=
*
pdev
;
*
pdev
=
dev
->
next
;
return
dev
;
}
...
...
dlls/gdi32/path.c
View file @
bf528c5e
...
...
@@ -101,21 +101,6 @@ static inline struct path_physdev *get_path_physdev( PHYSDEV dev )
return
(
struct
path_physdev
*
)
dev
;
}
static
inline
void
pop_path_driver
(
DC
*
dc
,
struct
path_physdev
*
physdev
)
{
pop_dc_driver
(
dc
,
&
physdev
->
dev
);
HeapFree
(
GetProcessHeap
(),
0
,
physdev
);
}
static
inline
struct
path_physdev
*
find_path_physdev
(
DC
*
dc
)
{
PHYSDEV
dev
;
for
(
dev
=
dc
->
physDev
;
dev
->
funcs
!=
&
null_driver
;
dev
=
dev
->
next
)
if
(
dev
->
funcs
==
&
path_driver
)
return
get_path_physdev
(
dev
);
return
NULL
;
}
void
free_gdi_path
(
struct
gdi_path
*
path
)
{
HeapFree
(
GetProcessHeap
(),
0
,
path
->
points
);
...
...
@@ -805,7 +790,8 @@ static BOOL pathdrv_AbortPath( PHYSDEV dev )
if
(
!
dc
)
return
FALSE
;
free_gdi_path
(
physdev
->
path
);
pop_path_driver
(
dc
,
physdev
);
pop_dc_driver
(
dc
,
&
path_driver
);
HeapFree
(
GetProcessHeap
(),
0
,
physdev
);
release_dc_ptr
(
dc
);
return
TRUE
;
}
...
...
@@ -821,7 +807,8 @@ static BOOL pathdrv_EndPath( PHYSDEV dev )
if
(
!
dc
)
return
FALSE
;
dc
->
path
=
physdev
->
path
;
pop_path_driver
(
dc
,
physdev
);
pop_dc_driver
(
dc
,
&
path_driver
);
HeapFree
(
GetProcessHeap
(),
0
,
physdev
);
release_dc_ptr
(
dc
);
return
TRUE
;
}
...
...
@@ -874,26 +861,25 @@ BOOL PATH_SavePath( DC *dst, DC *src )
BOOL
PATH_RestorePath
(
DC
*
dst
,
DC
*
src
)
{
struct
path_physdev
*
physdev
=
find_path_physdev
(
dst
);
PHYSDEV
dev
;
struct
path_physdev
*
physdev
;
if
(
src
->
path
&&
src
->
path_open
)
if
(
(
dev
=
pop_dc_driver
(
dst
,
&
path_driver
))
)
{
if
(
!
physdev
)
{
if
(
!
path_driver
.
pCreateDC
(
&
dst
->
physDev
,
NULL
,
NULL
,
NULL
,
NULL
))
return
FALSE
;
physdev
=
get_path_physdev
(
find_dc_driver
(
dst
,
&
path_driver
));
}
else
free_gdi_path
(
physdev
->
path
);
physdev
=
get_path_physdev
(
dev
);
free_gdi_path
(
physdev
->
path
);
HeapFree
(
GetProcessHeap
(),
0
,
physdev
);
}
if
(
src
->
path
&&
src
->
path_open
)
{
if
(
!
path_driver
.
pCreateDC
(
&
dst
->
physDev
,
NULL
,
NULL
,
NULL
,
NULL
))
return
FALSE
;
physdev
=
get_path_physdev
(
find_dc_driver
(
dst
,
&
path_driver
));
physdev
->
path
=
src
->
path
;
src
->
path_open
=
FALSE
;
src
->
path
=
NULL
;
}
else
if
(
physdev
)
{
free_gdi_path
(
physdev
->
path
);
pop_path_driver
(
dst
,
physdev
);
}
if
(
dst
->
path
)
free_gdi_path
(
dst
->
path
);
dst
->
path
=
src
->
path
;
src
->
path
=
NULL
;
...
...
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