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
ab88c7cb
Commit
ab88c7cb
authored
May 27, 2023
by
Jacek Caban
Committed by
Alexandre Julliard
May 29, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Implement NtGdiIcmBrushInfo and use it instead of __wine_get_brush_bitmap_info.
parent
0492108a
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
34 additions
and
18 deletions
+34
-18
emfdc.c
dlls/gdi32/emfdc.c
+2
-2
metadc.c
dlls/gdi32/metadc.c
+3
-2
brush.c
dlls/win32u/brush.c
+10
-2
gdiobj.c
dlls/win32u/gdiobj.c
+0
-1
syscall.c
dlls/win32u/syscall.c
+1
-0
win32u.spec
dlls/win32u/win32u.spec
+1
-2
win32u_private.h
dlls/win32u/win32u_private.h
+0
-1
wrappers.c
dlls/win32u/wrappers.c
+0
-6
gdi.c
dlls/wow64win/gdi.c
+14
-0
syscall.h
dlls/wow64win/syscall.h
+1
-0
ntgdi.h
include/ntgdi.h
+2
-2
No files found.
dlls/gdi32/emfdc.c
View file @
ab88c7cb
...
...
@@ -489,7 +489,7 @@ static DWORD emfdc_create_brush( struct emf *emf, HBRUSH brush )
DWORD
info_size
;
UINT
usage
;
if
(
!
__wine_get_brush_bitmap_info
(
brush
,
info
,
NULL
,
&
usage
))
break
;
if
(
!
NtGdiIcmBrushInfo
(
0
,
brush
,
info
,
NULL
,
NULL
,
&
usage
,
NULL
,
0
))
break
;
info_size
=
get_dib_info_size
(
info
,
usage
);
emr
=
HeapAlloc
(
GetProcessHeap
(),
0
,
...
...
@@ -530,7 +530,7 @@ static DWORD emfdc_create_brush( struct emf *emf, HBRUSH brush )
if
(
info
->
bmiHeader
.
biClrUsed
==
1
<<
info
->
bmiHeader
.
biBitCount
)
info
->
bmiHeader
.
biClrUsed
=
0
;
memcpy
(
(
BYTE
*
)
emr
+
emr
->
offBmi
,
info
,
emr
->
cbBmi
);
__wine_get_brush_bitmap_info
(
brush
,
NULL
,
(
char
*
)
emr
+
emr
->
offBits
,
NULL
);
NtGdiIcmBrushInfo
(
0
,
brush
,
NULL
,
(
char
*
)
emr
+
emr
->
offBits
,
NULL
,
NULL
,
NULL
,
0
);
if
(
!
emfdc_record
(
emf
,
&
emr
->
emr
))
index
=
0
;
HeapFree
(
GetProcessHeap
(),
0
,
emr
);
...
...
dlls/gdi32/metadc.c
View file @
ab88c7cb
...
...
@@ -547,7 +547,8 @@ static INT16 metadc_create_brush( struct metadc *metadc, HBRUSH brush )
DWORD
info_size
;
UINT
usage
;
if
(
!
__wine_get_brush_bitmap_info
(
brush
,
src_info
,
NULL
,
&
usage
))
goto
done
;
if
(
!
NtGdiIcmBrushInfo
(
0
,
brush
,
src_info
,
NULL
,
NULL
,
&
usage
,
NULL
,
0
))
goto
done
;
info_size
=
get_dib_info_size
(
src_info
,
usage
);
size
=
FIELD_OFFSET
(
METARECORD
,
rdParm
[
2
]
)
+
...
...
@@ -559,7 +560,7 @@ static INT16 metadc_create_brush( struct metadc *metadc, HBRUSH brush )
mr
->
rdParm
[
0
]
=
logbrush
.
lbStyle
;
mr
->
rdParm
[
1
]
=
usage
;
dst_info
=
(
BITMAPINFO
*
)(
mr
->
rdParm
+
2
);
__wine_get_brush_bitmap_info
(
brush
,
dst_info
,
(
char
*
)
dst_info
+
info_size
,
NULL
);
NtGdiIcmBrushInfo
(
0
,
brush
,
dst_info
,
(
char
*
)
dst_info
+
info_size
,
NULL
,
NULL
,
NULL
,
0
);
if
(
dst_info
->
bmiHeader
.
biClrUsed
==
1
<<
dst_info
->
bmiHeader
.
biBitCount
)
dst_info
->
bmiHeader
.
biClrUsed
=
0
;
break
;
...
...
dlls/win32u/brush.c
View file @
ab88c7cb
...
...
@@ -145,13 +145,20 @@ void free_brush_pattern( struct brush_pattern *pattern )
}
/**********************************************************************
*
__wine_get_brush_bitmap_i
nfo (win32u.@)
*
NtGdiIcmBrushI
nfo (win32u.@)
*/
BOOL
CDECL
__wine_get_brush_bitmap_info
(
HBRUSH
handle
,
BITMAPINFO
*
info
,
void
*
bits
,
UINT
*
usage
)
BOOL
WINAPI
NtGdiIcmBrushInfo
(
HDC
hdc
,
HBRUSH
handle
,
BITMAPINFO
*
info
,
void
*
bits
,
ULONG
*
bits_size
,
UINT
*
usage
,
BOOL
*
unk
,
UINT
mode
)
{
BRUSHOBJ
*
brush
;
BOOL
ret
=
FALSE
;
if
(
mode
)
{
FIXME
(
"unsupported mode %u
\n
"
,
mode
);
return
FALSE
;
}
if
(
!
(
brush
=
GDI_GetObjPtr
(
handle
,
NTGDI_OBJ_BRUSH
)))
return
FALSE
;
if
(
brush
->
pattern
.
info
)
...
...
@@ -183,6 +190,7 @@ BOOL CDECL __wine_get_brush_bitmap_info( HBRUSH handle, BITMAPINFO *info, void *
else
memcpy
(
bits
,
brush
->
pattern
.
bits
.
ptr
,
brush
->
pattern
.
info
->
bmiHeader
.
biSizeImage
);
}
if
(
bits_size
)
*
bits_size
=
brush
->
pattern
.
info
->
bmiHeader
.
biSizeImage
;
if
(
usage
)
*
usage
=
brush
->
pattern
.
usage
;
ret
=
TRUE
;
}
...
...
dlls/win32u/gdiobj.c
View file @
ab88c7cb
...
...
@@ -1031,7 +1031,6 @@ BOOL WINAPI NtGdiSetColorAdjustment( HDC hdc, const COLORADJUSTMENT *ca )
static
struct
unix_funcs
unix_funcs
=
{
SetDIBits
,
__wine_get_brush_bitmap_info
,
__wine_get_file_outline_text_metric
,
__wine_get_icm_profile
,
__wine_send_input
,
...
...
dlls/win32u/syscall.c
View file @
ab88c7cb
...
...
@@ -145,6 +145,7 @@ static void * const syscalls[] =
NtGdiGetTransform
,
NtGdiGradientFill
,
NtGdiHfontCreate
,
NtGdiIcmBrushInfo
,
NtGdiInitSpool
,
NtGdiIntersectClipRect
,
NtGdiInvertRgn
,
...
...
dlls/win32u/win32u.spec
View file @
ab88c7cb
...
...
@@ -530,7 +530,7 @@
@ stub NtGdiHT_Get8BPPFormatPalette
@ stub NtGdiHT_Get8BPPMaskPalette
@ stdcall -syscall NtGdiHfontCreate(ptr long long long ptr)
@ st
ub NtGdiIcmBrushInfo
@ st
dcall -syscall NtGdiIcmBrushInfo(long long ptr ptr ptr ptr ptr long)
@ stub NtGdiInit
@ stdcall -syscall NtGdiInitSpool()
@ stdcall -syscall NtGdiIntersectClipRect(long long long long long)
...
...
@@ -1325,6 +1325,5 @@
# gdi32
@ stdcall SetDIBits(long long long long ptr ptr long)
@ cdecl __wine_get_brush_bitmap_info(long ptr ptr ptr)
@ cdecl __wine_get_icm_profile(long long ptr ptr)
@ cdecl __wine_get_file_outline_text_metric(wstr ptr)
dlls/win32u/win32u_private.h
View file @
ab88c7cb
...
...
@@ -38,7 +38,6 @@ struct unix_funcs
INT
(
WINAPI
*
pSetDIBits
)(
HDC
hdc
,
HBITMAP
hbitmap
,
UINT
startscan
,
UINT
lines
,
const
void
*
bits
,
const
BITMAPINFO
*
info
,
UINT
coloruse
);
BOOL
(
CDECL
*
get_brush_bitmap_info
)(
HBRUSH
handle
,
BITMAPINFO
*
info
,
void
*
bits
,
UINT
*
usage
);
BOOL
(
CDECL
*
get_file_outline_text_metric
)(
const
WCHAR
*
path
,
OUTLINETEXTMETRICW
*
otm
);
BOOL
(
CDECL
*
get_icm_profile
)(
HDC
hdc
,
BOOL
allow_default
,
DWORD
*
size
,
WCHAR
*
filename
);
BOOL
(
CDECL
*
wine_send_input
)(
HWND
hwnd
,
const
INPUT
*
input
,
const
RAWINPUT
*
rawinput
);
...
...
dlls/win32u/wrappers.c
View file @
ab88c7cb
...
...
@@ -38,12 +38,6 @@ BOOL CDECL __wine_get_icm_profile( HDC hdc, BOOL allow_default, DWORD *size, WCH
return
unix_funcs
->
get_icm_profile
(
hdc
,
allow_default
,
size
,
filename
);
}
BOOL
CDECL
__wine_get_brush_bitmap_info
(
HBRUSH
handle
,
BITMAPINFO
*
info
,
void
*
bits
,
UINT
*
usage
)
{
if
(
!
unix_funcs
)
return
FALSE
;
return
unix_funcs
->
get_brush_bitmap_info
(
handle
,
info
,
bits
,
usage
);
}
BOOL
CDECL
__wine_get_file_outline_text_metric
(
const
WCHAR
*
path
,
OUTLINETEXTMETRICW
*
otm
)
{
if
(
!
unix_funcs
)
return
FALSE
;
...
...
dlls/wow64win/gdi.c
View file @
ab88c7cb
...
...
@@ -1377,6 +1377,20 @@ NTSTATUS WINAPI wow64_NtGdiGradientFill( UINT *args )
return
NtGdiGradientFill
(
hdc
,
vert_array
,
nvert
,
grad_array
,
ngrad
,
mode
);
}
NTSTATUS
WINAPI
wow64_NtGdiIcmBrushInfo
(
UINT
*
args
)
{
HDC
hdc
=
get_handle
(
&
args
);
HBRUSH
handle
=
get_handle
(
&
args
);
BITMAPINFO
*
info
=
get_ptr
(
&
args
);
void
*
bits
=
get_ptr
(
&
args
);
ULONG
*
bits_size
=
get_ptr
(
&
args
);
UINT
*
usage
=
get_ptr
(
&
args
);
BOOL
*
unk
=
get_ptr
(
&
args
);
UINT
mode
=
get_ulong
(
&
args
);
return
NtGdiIcmBrushInfo
(
hdc
,
handle
,
info
,
bits
,
bits_size
,
usage
,
unk
,
mode
);
}
NTSTATUS
WINAPI
wow64_NtGdiInvertRgn
(
UINT
*
args
)
{
HDC
hdc
=
get_handle
(
&
args
);
...
...
dlls/wow64win/syscall.h
View file @
ab88c7cb
...
...
@@ -131,6 +131,7 @@
SYSCALL_ENTRY( NtGdiGetTransform ) \
SYSCALL_ENTRY( NtGdiGradientFill ) \
SYSCALL_ENTRY( NtGdiHfontCreate ) \
SYSCALL_ENTRY( NtGdiIcmBrushInfo ) \
SYSCALL_ENTRY( NtGdiInitSpool ) \
SYSCALL_ENTRY( NtGdiIntersectClipRect ) \
SYSCALL_ENTRY( NtGdiInvertRgn ) \
...
...
include/ntgdi.h
View file @
ab88c7cb
...
...
@@ -375,6 +375,8 @@ BOOL WINAPI NtGdiGradientFill( HDC hdc, TRIVERTEX *vert_array, ULONG nvert,
void
*
grad_array
,
ULONG
ngrad
,
ULONG
mode
);
HFONT
WINAPI
NtGdiHfontCreate
(
const
void
*
logfont
,
ULONG
unk2
,
ULONG
unk3
,
ULONG
unk4
,
void
*
data
);
BOOL
WINAPI
NtGdiIcmBrushInfo
(
HDC
hdc
,
HBRUSH
handle
,
BITMAPINFO
*
info
,
void
*
bits
,
ULONG
*
bits_size
,
UINT
*
usage
,
BOOL
*
unk
,
UINT
mode
);
DWORD
WINAPI
NtGdiInitSpool
(
void
);
INT
WINAPI
NtGdiIntersectClipRect
(
HDC
hdc
,
INT
left
,
INT
top
,
INT
right
,
INT
bottom
);
BOOL
WINAPI
NtGdiInvertRgn
(
HDC
hdc
,
HRGN
hrgn
);
...
...
@@ -481,8 +483,6 @@ NTSTATUS WINAPI NtGdiDdDDISetQueuedLimit( D3DKMT_SETQUEUEDLIMIT *desc );
NTSTATUS
WINAPI
NtGdiDdDDISetVidPnSourceOwner
(
const
D3DKMT_SETVIDPNSOURCEOWNER
*
desc
);
/* Wine extensions */
extern
BOOL
CDECL
__wine_get_brush_bitmap_info
(
HBRUSH
handle
,
BITMAPINFO
*
info
,
void
*
bits
,
UINT
*
usage
);
extern
BOOL
CDECL
__wine_get_icm_profile
(
HDC
hdc
,
BOOL
allow_default
,
DWORD
*
size
,
WCHAR
*
filename
);
extern
BOOL
CDECL
__wine_get_file_outline_text_metric
(
const
WCHAR
*
path
,
...
...
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