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
901c1997
Commit
901c1997
authored
Sep 07, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Make the push/pop_dc_driver functions available to the drivers.
parent
9a63a25b
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
39 deletions
+24
-39
bitmap.c
dlls/gdi32/bitmap.c
+4
-4
dc.c
dlls/gdi32/dc.c
+3
-31
init.c
dlls/gdi32/enhmfdrv/init.c
+1
-1
gdi_private.h
dlls/gdi32/gdi_private.h
+0
-2
init.c
dlls/gdi32/mfdrv/init.c
+1
-1
gdi_driver.h
include/wine/gdi_driver.h
+15
-0
No files found.
dlls/gdi32/bitmap.c
View file @
901c1997
...
...
@@ -703,12 +703,12 @@ static HGDIOBJ BITMAP_SelectObject( HGDIOBJ handle, HDC hdc )
old_physdev
=
GET_DC_PHYSDEV
(
dc
,
pSelectBitmap
);
if
(
old_physdev
==
&
dc
->
dibdrv
.
dev
)
pop_dc_driver
(
dc
,
old_physd
ev
);
old_physdev
=
pop_dc_driver
(
&
dc
->
physD
ev
);
if
(
bitmap
->
dib
)
{
physdev
=
&
dc
->
dibdrv
.
dev
;
push_dc_driver
(
dc
,
physdev
,
physdev
->
funcs
);
push_dc_driver
(
&
dc
->
physDev
,
physdev
,
physdev
->
funcs
);
}
else
physdev
=
GET_DC_PHYSDEV
(
dc
,
pSelectBitmap
);
...
...
@@ -742,8 +742,8 @@ static HGDIOBJ BITMAP_SelectObject( HGDIOBJ handle, HDC hdc )
done:
if
(
!
ret
)
{
if
(
physdev
==
&
dc
->
dibdrv
.
dev
)
pop_dc_driver
(
dc
,
physd
ev
);
if
(
old_physdev
==
&
dc
->
dibdrv
.
dev
)
push_dc_driver
(
dc
,
old_physdev
,
old_physdev
->
funcs
);
if
(
physdev
==
&
dc
->
dibdrv
.
dev
)
pop_dc_driver
(
&
dc
->
physD
ev
);
if
(
old_physdev
==
&
dc
->
dibdrv
.
dev
)
push_dc_driver
(
&
dc
->
physDev
,
old_physdev
,
old_physdev
->
funcs
);
}
release_dc_ptr
(
dc
);
return
ret
;
...
...
dlls/gdi32/dc.c
View file @
901c1997
...
...
@@ -183,8 +183,7 @@ void free_dc_ptr( DC *dc )
while
(
dc
->
physDev
!=
&
dc
->
nulldrv
)
{
PHYSDEV
physdev
=
dc
->
physDev
;
pop_dc_driver
(
dc
,
physdev
);
PHYSDEV
physdev
=
pop_dc_driver
(
&
dc
->
physDev
);
physdev
->
funcs
->
pDeleteDC
(
physdev
);
}
free_gdi_handle
(
dc
->
hSelf
);
...
...
@@ -248,33 +247,6 @@ void update_dc( DC *dc )
/***********************************************************************
* push_dc_driver
*
* Push a driver on top of the DC driver stack.
*/
void
push_dc_driver
(
DC
*
dc
,
PHYSDEV
physdev
,
const
DC_FUNCTIONS
*
funcs
)
{
physdev
->
funcs
=
funcs
;
physdev
->
next
=
dc
->
physDev
;
physdev
->
hdc
=
dc
->
hSelf
;
dc
->
physDev
=
physdev
;
}
/***********************************************************************
* pop_dc_driver
*
* Pop the top driver from the DC driver stack.
*/
void
pop_dc_driver
(
DC
*
dc
,
PHYSDEV
physdev
)
{
assert
(
physdev
==
dc
->
physDev
);
assert
(
physdev
!=
&
dc
->
nulldrv
);
dc
->
physDev
=
physdev
->
next
;
}
/***********************************************************************
* DC_DeleteObject
*/
static
BOOL
DC_DeleteObject
(
HGDIOBJ
handle
)
...
...
@@ -662,7 +634,7 @@ HDC WINAPI CreateDCW( LPCWSTR driver, LPCWSTR device, LPCWSTR output,
WARN
(
"creation aborted by device
\n
"
);
goto
error
;
}
push_dc_driver
(
dc
,
physdev
,
funcs
);
push_dc_driver
(
&
dc
->
physDev
,
physdev
,
funcs
);
}
dc
->
vis_rect
.
left
=
0
;
...
...
@@ -786,7 +758,7 @@ HDC WINAPI CreateCompatibleDC( HDC hdc )
WARN
(
"creation aborted by device
\n
"
);
goto
error
;
}
push_dc_driver
(
dc
,
physDev
,
funcs
);
push_dc_driver
(
&
dc
->
physDev
,
physDev
,
funcs
);
}
DC_InitDC
(
dc
);
release_dc_ptr
(
dc
);
...
...
dlls/gdi32/enhmfdrv/init.c
View file @
901c1997
...
...
@@ -331,7 +331,7 @@ HDC WINAPI CreateEnhMetaFileW(
return
0
;
}
push_dc_driver
(
dc
,
&
physDev
->
dev
,
&
EMFDRV_Funcs
);
push_dc_driver
(
&
dc
->
physDev
,
&
physDev
->
dev
,
&
EMFDRV_Funcs
);
physDev
->
handles
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
HANDLE_LIST_INC
*
sizeof
(
physDev
->
handles
[
0
]));
physDev
->
handles_size
=
HANDLE_LIST_INC
;
...
...
dlls/gdi32/gdi_private.h
View file @
901c1997
...
...
@@ -330,8 +330,6 @@ extern void free_dc_ptr( DC *dc ) DECLSPEC_HIDDEN;
extern
DC
*
get_dc_ptr
(
HDC
hdc
)
DECLSPEC_HIDDEN
;
extern
void
release_dc_ptr
(
DC
*
dc
)
DECLSPEC_HIDDEN
;
extern
void
update_dc
(
DC
*
dc
)
DECLSPEC_HIDDEN
;
extern
void
push_dc_driver
(
DC
*
dc
,
PHYSDEV
physdev
,
const
DC_FUNCTIONS
*
funcs
)
DECLSPEC_HIDDEN
;
extern
void
pop_dc_driver
(
DC
*
dc
,
PHYSDEV
physdev
)
DECLSPEC_HIDDEN
;
extern
void
DC_InitDC
(
DC
*
dc
)
DECLSPEC_HIDDEN
;
extern
void
DC_UpdateXforms
(
DC
*
dc
)
DECLSPEC_HIDDEN
;
...
...
dlls/gdi32/mfdrv/init.c
View file @
901c1997
...
...
@@ -224,7 +224,7 @@ static DC *MFDRV_AllocMetaFile(void)
return
NULL
;
}
push_dc_driver
(
dc
,
&
physDev
->
dev
,
&
MFDRV_Funcs
);
push_dc_driver
(
&
dc
->
physDev
,
&
physDev
->
dev
,
&
MFDRV_Funcs
);
physDev
->
handles
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
HANDLE_LIST_INC
*
sizeof
(
physDev
->
handles
[
0
]));
physDev
->
handles_size
=
HANDLE_LIST_INC
;
...
...
include/wine/gdi_driver.h
View file @
901c1997
...
...
@@ -199,4 +199,19 @@ static inline PHYSDEV get_physdev_entry_point( PHYSDEV dev, size_t offset )
#define GET_NEXT_PHYSDEV(dev,func) \
get_physdev_entry_point( (dev)->next, FIELD_OFFSET(struct gdi_dc_funcs,func))
static
inline
void
push_dc_driver
(
PHYSDEV
*
dev
,
PHYSDEV
physdev
,
const
struct
gdi_dc_funcs
*
funcs
)
{
physdev
->
funcs
=
funcs
;
physdev
->
next
=
*
dev
;
physdev
->
hdc
=
(
*
dev
)
->
hdc
;
*
dev
=
physdev
;
}
static
inline
PHYSDEV
pop_dc_driver
(
PHYSDEV
*
dev
)
{
PHYSDEV
ret
=
*
dev
;
*
dev
=
ret
->
next
;
return
ret
;
}
#endif
/* __WINE_WINE_GDI_DRIVER_H */
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