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
3dbe180e
Commit
3dbe180e
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: Extend NtGdiSetDIBitsToDeviceInternal for SetDIBits implementation.
parent
ab88c7cb
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
25 additions
and
36 deletions
+25
-36
dc.c
dlls/gdi32/dc.c
+15
-0
dib.c
dlls/win32u/dib.c
+7
-22
gdiobj.c
dlls/win32u/gdiobj.c
+0
-1
win32u.spec
dlls/win32u/win32u.spec
+0
-1
win32u_private.h
dlls/win32u/win32u_private.h
+0
-3
wrappers.c
dlls/win32u/wrappers.c
+0
-8
bitblt.c
dlls/winex11.drv/bitblt.c
+3
-1
No files found.
dlls/gdi32/dc.c
View file @
3dbe180e
...
...
@@ -1970,6 +1970,21 @@ BOOL WINAPI GdiAlphaBlend( HDC hdc_dst, int x_dst, int y_dst, int width_dst, int
*
(
DWORD
*
)
&
blend_function
,
0
/* FIXME */
);
}
/******************************************************************************
* SetDIBits (GDI32.@)
*
* Sets pixels in a bitmap using colors from DIB.
*/
INT
WINAPI
SetDIBits
(
HDC
hdc
,
HBITMAP
hbitmap
,
UINT
startscan
,
UINT
lines
,
const
void
*
bits
,
const
BITMAPINFO
*
info
,
UINT
coloruse
)
{
/* Wine-specific: pass hbitmap to NtGdiSetDIBitsToDeviceInternal */
return
NtGdiSetDIBitsToDeviceInternal
(
hdc
,
0
,
0
,
0
,
0
,
0
,
0
,
startscan
,
lines
,
bits
,
info
,
coloruse
,
0
,
0
,
FALSE
,
hbitmap
);
}
/***********************************************************************
* SetDIBitsToDevice (GDI32.@)
*/
...
...
dlls/win32u/dib.c
View file @
3dbe180e
...
...
@@ -655,27 +655,10 @@ INT WINAPI NtGdiStretchDIBitsInternal( HDC hdc, INT xDst, INT yDst, INT widthDst
}
/******************************************************************************
* SetDIBits [GDI32.@]
*
* Sets pixels in a bitmap using colors from DIB.
*
* PARAMS
* hdc [I] Handle to device context
* hbitmap [I] Handle to bitmap
* startscan [I] Starting scan line
* lines [I] Number of scan lines
* bits [I] Array of bitmap bits
* info [I] Address of structure with data
* coloruse [I] Type of color indexes to use
*
* RETURNS
* Success: Number of scan lines copied
* Failure: 0
*/
INT
WINAPI
SetDIBits
(
HDC
hdc
,
HBITMAP
hbitmap
,
UINT
startscan
,
UINT
lines
,
LPCVOID
bits
,
const
BITMAPINFO
*
info
,
UINT
coloruse
)
/* Sets pixels in a bitmap using colors from DIB, see SetDIBits */
static
int
set_di_bits
(
HDC
hdc
,
HBITMAP
hbitmap
,
UINT
startscan
,
UINT
lines
,
LPCVOID
bits
,
const
BITMAPINFO
*
info
,
UINT
coloruse
)
{
BITMAPOBJ
*
bitmap
;
char
src_bmibuf
[
FIELD_OFFSET
(
BITMAPINFO
,
bmiColors
[
256
]
)];
...
...
@@ -913,6 +896,8 @@ INT WINAPI NtGdiSetDIBitsToDeviceInternal( HDC hdc, INT xDest, INT yDest, DWORD
INT
ret
=
0
;
DC
*
dc
;
if
(
xform
)
return
set_di_bits
(
hdc
,
xform
,
startscan
,
lines
,
bits
,
bmi
,
coloruse
);
if
(
!
bits
)
return
0
;
if
(
!
bitmapinfo_from_user_bitmapinfo
(
info
,
bmi
,
coloruse
,
TRUE
))
{
...
...
@@ -1468,7 +1453,7 @@ HBITMAP WINAPI NtGdiCreateDIBitmapInternal( HDC hdc, INT width, INT height, DWOR
{
if
(
init
&
CBM_INIT
)
{
if
(
SetDIB
its
(
hdc
,
handle
,
0
,
height
,
bits
,
data
,
coloruse
)
==
0
)
if
(
set_di_b
its
(
hdc
,
handle
,
0
,
height
,
bits
,
data
,
coloruse
)
==
0
)
{
NtGdiDeleteObjectApp
(
handle
);
handle
=
0
;
...
...
dlls/win32u/gdiobj.c
View file @
3dbe180e
...
...
@@ -1030,7 +1030,6 @@ BOOL WINAPI NtGdiSetColorAdjustment( HDC hdc, const COLORADJUSTMENT *ca )
static
struct
unix_funcs
unix_funcs
=
{
SetDIBits
,
__wine_get_file_outline_text_metric
,
__wine_get_icm_profile
,
__wine_send_input
,
...
...
dlls/win32u/win32u.spec
View file @
3dbe180e
...
...
@@ -1324,6 +1324,5 @@
@ cdecl __wine_send_input(long ptr ptr)
# gdi32
@ stdcall SetDIBits(long long long long ptr ptr long)
@ 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 @
3dbe180e
...
...
@@ -35,9 +35,6 @@
struct
unix_funcs
{
/* Wine-specific functions */
INT
(
WINAPI
*
pSetDIBits
)(
HDC
hdc
,
HBITMAP
hbitmap
,
UINT
startscan
,
UINT
lines
,
const
void
*
bits
,
const
BITMAPINFO
*
info
,
UINT
coloruse
);
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 @
3dbe180e
...
...
@@ -24,14 +24,6 @@
static
const
struct
unix_funcs
*
unix_funcs
;
INT
WINAPI
SetDIBits
(
HDC
hdc
,
HBITMAP
hbitmap
,
UINT
startscan
,
UINT
lines
,
const
void
*
bits
,
const
BITMAPINFO
*
info
,
UINT
coloruse
)
{
if
(
!
unix_funcs
)
return
0
;
return
unix_funcs
->
pSetDIBits
(
hdc
,
hbitmap
,
startscan
,
lines
,
bits
,
info
,
coloruse
);
}
BOOL
CDECL
__wine_get_icm_profile
(
HDC
hdc
,
BOOL
allow_default
,
DWORD
*
size
,
WCHAR
*
filename
)
{
if
(
!
unix_funcs
)
return
FALSE
;
...
...
dlls/winex11.drv/bitblt.c
View file @
3dbe180e
...
...
@@ -1497,7 +1497,9 @@ Pixmap create_pixmap_from_image( HDC hdc, const XVisualInfo *vis, const BITMAPIN
{
if
(
src_info
->
bmiHeader
.
biBitCount
==
1
&&
!
src_info
->
bmiHeader
.
biClrUsed
)
memcpy
(
src_info
->
bmiColors
,
default_colortable
,
sizeof
(
default_colortable
)
);
SetDIBits
(
hdc
,
dib
,
0
,
abs
(
info
->
bmiHeader
.
biHeight
),
bits
->
ptr
,
src_info
,
coloruse
);
NtGdiSetDIBitsToDeviceInternal
(
hdc
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
abs
(
info
->
bmiHeader
.
biHeight
),
bits
->
ptr
,
src_info
,
coloruse
,
0
,
0
,
FALSE
,
dib
);
/* SetDIBits */
dst_bits
.
free
=
NULL
;
dst_bits
.
is_copy
=
TRUE
;
err
=
put_pixmap_image
(
pixmap
,
vis
,
dst_info
,
&
dst_bits
);
...
...
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