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
79ef408c
Commit
79ef408c
authored
Aug 29, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Add a helper function to initialize DIB info from a bitmap object.
parent
a13df5ce
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
10 deletions
+11
-10
bitblt.c
dlls/gdi32/dibdrv/bitblt.c
+2
-8
dc.c
dlls/gdi32/dibdrv/dc.c
+8
-2
dibdrv.h
dlls/gdi32/dibdrv/dibdrv.h
+1
-0
No files found.
dlls/gdi32/dibdrv/bitblt.c
View file @
79ef408c
...
...
@@ -621,10 +621,7 @@ DWORD dibdrv_GetImage( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *info,
BITMAPOBJ
*
bmp
=
GDI_GetObjPtr
(
hbitmap
,
OBJ_BITMAP
);
if
(
!
bmp
)
return
ERROR_INVALID_HANDLE
;
assert
(
bmp
->
dib
);
if
(
!
init_dib_info
(
&
stand_alone
,
&
bmp
->
dib
->
dsBmih
,
bmp
->
dib
->
dsBitfields
,
bmp
->
color_table
,
bmp
->
nb_colors
,
bmp
->
dib
->
dsBm
.
bmBits
,
0
))
if
(
!
init_dib_info_from_bitmapobj
(
&
stand_alone
,
bmp
,
0
))
{
ret
=
ERROR_BAD_FORMAT
;
goto
done
;
...
...
@@ -722,10 +719,7 @@ DWORD dibdrv_PutImage( PHYSDEV dev, HBITMAP hbitmap, HRGN clip, BITMAPINFO *info
BITMAPOBJ
*
bmp
=
GDI_GetObjPtr
(
hbitmap
,
OBJ_BITMAP
);
if
(
!
bmp
)
return
ERROR_INVALID_HANDLE
;
assert
(
bmp
->
dib
);
if
(
!
init_dib_info
(
&
stand_alone
,
&
bmp
->
dib
->
dsBmih
,
bmp
->
dib
->
dsBitfields
,
bmp
->
color_table
,
bmp
->
nb_colors
,
bmp
->
dib
->
dsBm
.
bmBits
,
0
))
if
(
!
init_dib_info_from_bitmapobj
(
&
stand_alone
,
bmp
,
0
))
{
ret
=
ERROR_BAD_FORMAT
;
goto
done
;
...
...
dlls/gdi32/dibdrv/dc.c
View file @
79ef408c
...
...
@@ -211,6 +211,13 @@ BOOL init_dib_info_from_bitmapinfo(dib_info *dib, const BITMAPINFO *info, void *
return
init_dib_info
(
dib
,
&
info
->
bmiHeader
,
bitfields
,
colors
?
colorptr
:
NULL
,
colors
,
bits
,
flags
);
}
BOOL
init_dib_info_from_bitmapobj
(
dib_info
*
dib
,
BITMAPOBJ
*
bmp
,
enum
dib_info_flags
flags
)
{
assert
(
bmp
->
dib
);
return
init_dib_info
(
dib
,
&
bmp
->
dib
->
dsBmih
,
bmp
->
dib
->
dsBitfields
,
bmp
->
color_table
,
bmp
->
nb_colors
,
bmp
->
dib
->
dsBm
.
bmBits
,
flags
);
}
static
void
clear_dib_info
(
dib_info
*
dib
)
{
dib
->
color_table
=
NULL
;
...
...
@@ -368,8 +375,7 @@ static HBITMAP dibdrv_SelectBitmap( PHYSDEV dev, HBITMAP bitmap )
clear_dib_info
(
&
pdev
->
brush_dib
);
pdev
->
brush_and_bits
=
pdev
->
brush_xor_bits
=
NULL
;
if
(
!
init_dib_info
(
&
pdev
->
dib
,
&
bmp
->
dib
->
dsBmih
,
bmp
->
dib
->
dsBitfields
,
bmp
->
color_table
,
bmp
->
nb_colors
,
bmp
->
dib
->
dsBm
.
bmBits
,
private_color_table
))
if
(
!
init_dib_info_from_bitmapobj
(
&
pdev
->
dib
,
bmp
,
private_color_table
))
pdev
->
defer
|=
DEFER_FORMAT
;
GDI_ReleaseObj
(
bitmap
);
...
...
dlls/gdi32/dibdrv/dibdrv.h
View file @
79ef408c
...
...
@@ -80,6 +80,7 @@ extern BOOL init_dib_info(dib_info *dib, const BITMAPINFOHEADER *bi, const DWORD
extern
BOOL
init_dib_info_from_packed
(
dib_info
*
dib
,
const
BITMAPINFOHEADER
*
bi
,
WORD
usage
,
HPALETTE
pal
)
DECLSPEC_HIDDEN
;
extern
BOOL
init_dib_info_from_bitmapinfo
(
dib_info
*
dib
,
const
BITMAPINFO
*
info
,
void
*
bits
,
enum
dib_info_flags
flags
)
DECLSPEC_HIDDEN
;
extern
BOOL
init_dib_info_from_bitmapobj
(
dib_info
*
dib
,
BITMAPOBJ
*
bmp
,
enum
dib_info_flags
flags
)
DECLSPEC_HIDDEN
;
extern
void
free_dib_info
(
dib_info
*
dib
)
DECLSPEC_HIDDEN
;
extern
void
free_pattern_brush
(
dibdrv_physdev
*
pdev
)
DECLSPEC_HIDDEN
;
extern
void
copy_dib_color_info
(
dib_info
*
dst
,
const
dib_info
*
src
)
DECLSPEC_HIDDEN
;
...
...
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