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
a4139168
Commit
a4139168
authored
Oct 13, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Get rid of the return value in DIB conversion functions, they never fail now.
parent
587f492f
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
66 deletions
+13
-66
dc.c
dlls/gdi32/dibdrv/dc.c
+2
-1
dibdrv.h
dlls/gdi32/dibdrv/dibdrv.h
+1
-1
objects.c
dlls/gdi32/dibdrv/objects.c
+1
-5
primitives.c
dlls/gdi32/dibdrv/primitives.c
+9
-59
No files found.
dlls/gdi32/dibdrv/dc.c
View file @
a4139168
...
...
@@ -290,7 +290,8 @@ DWORD convert_bitmapinfo( const BITMAPINFO *src_info, void *src_bits, struct bit
__TRY
{
ret
=
dst_dib
.
funcs
->
convert_to
(
&
dst_dib
,
&
src_dib
,
&
src
->
visrect
);
dst_dib
.
funcs
->
convert_to
(
&
dst_dib
,
&
src_dib
,
&
src
->
visrect
);
ret
=
TRUE
;
}
__EXCEPT_PAGE_FAULT
{
...
...
dlls/gdi32/dibdrv/dibdrv.h
View file @
a4139168
...
...
@@ -141,7 +141,7 @@ typedef struct primitive_funcs
void
(
*
copy_rect
)(
const
dib_info
*
dst
,
const
RECT
*
rc
,
const
dib_info
*
src
,
const
POINT
*
origin
,
int
rop2
,
int
overlap
);
DWORD
(
*
colorref_to_pixel
)(
const
dib_info
*
dib
,
COLORREF
color
);
BOOL
(
*
convert_to
)(
dib_info
*
dst
,
const
dib_info
*
src
,
const
RECT
*
src_rect
);
void
(
*
convert_to
)(
dib_info
*
dst
,
const
dib_info
*
src
,
const
RECT
*
src_rect
);
BOOL
(
*
create_rop_masks
)(
const
dib_info
*
dib
,
const
dib_info
*
hatch
,
const
rop_mask
*
fg
,
const
rop_mask
*
bg
,
rop_mask_bits
*
bits
);
void
(
*
stretch_row
)(
const
dib_info
*
dst_dib
,
const
POINT
*
dst_start
,
...
...
dlls/gdi32/dibdrv/objects.c
View file @
a4139168
...
...
@@ -1349,13 +1349,9 @@ HBRUSH dibdrv_SelectBrush( PHYSDEV dev, HBRUSH hbrush )
rect
.
right
=
orig_dib
.
width
;
rect
.
bottom
=
orig_dib
.
height
;
if
(
pdev
->
brush_dib
.
funcs
->
convert_to
(
&
pdev
->
brush_dib
,
&
orig_dib
,
&
rect
))
{
pdev
->
brush_dib
.
funcs
->
convert_to
(
&
pdev
->
brush_dib
,
&
orig_dib
,
&
rect
);
pdev
->
brush_rects
=
pattern_brush
;
pdev
->
defer
&=
~
DEFER_BRUSH
;
}
else
free_dib_info
(
&
pdev
->
brush_dib
);
free_dib_info
(
&
orig_dib
);
}
GlobalUnlock
((
HGLOBAL
)
logbrush
.
lbHatch
);
...
...
dlls/gdi32/dibdrv/primitives.c
View file @
a4139168
...
...
@@ -1141,7 +1141,7 @@ static inline BOOL bit_fields_match(const dib_info *d1, const dib_info *d2)
d1
->
blue_mask
==
d2
->
blue_mask
;
}
static
BOOL
convert_to_8888
(
dib_info
*
dst
,
const
dib_info
*
src
,
const
RECT
*
src_rect
)
static
void
convert_to_8888
(
dib_info
*
dst
,
const
dib_info
*
src
,
const
RECT
*
src_rect
)
{
DWORD
*
dst_start
=
get_pixel_ptr_32
(
dst
,
0
,
0
),
*
dst_pixel
,
src_val
;
int
x
,
y
,
pad_size
=
(
dst
->
width
-
(
src_rect
->
right
-
src_rect
->
left
))
*
4
;
...
...
@@ -1376,16 +1376,10 @@ static BOOL convert_to_8888(dib_info *dst, const dib_info *src, const RECT *src_
}
break
;
}
default:
FIXME
(
"Unsupported conversion: %d -> 8888
\n
"
,
src
->
bit_count
);
return
FALSE
;
}
return
TRUE
;
}
static
BOOL
convert_to_32
(
dib_info
*
dst
,
const
dib_info
*
src
,
const
RECT
*
src_rect
)
static
void
convert_to_32
(
dib_info
*
dst
,
const
dib_info
*
src
,
const
RECT
*
src_rect
)
{
DWORD
*
dst_start
=
get_pixel_ptr_32
(
dst
,
0
,
0
),
*
dst_pixel
,
src_val
;
int
x
,
y
,
pad_size
=
(
dst
->
width
-
(
src_rect
->
right
-
src_rect
->
left
))
*
4
;
...
...
@@ -1648,16 +1642,10 @@ static BOOL convert_to_32(dib_info *dst, const dib_info *src, const RECT *src_re
}
break
;
}
default:
FIXME
(
"Unsupported conversion: %d -> 32
\n
"
,
src
->
bit_count
);
return
FALSE
;
}
return
TRUE
;
}
static
BOOL
convert_to_24
(
dib_info
*
dst
,
const
dib_info
*
src
,
const
RECT
*
src_rect
)
static
void
convert_to_24
(
dib_info
*
dst
,
const
dib_info
*
src
,
const
RECT
*
src_rect
)
{
BYTE
*
dst_start
=
get_pixel_ptr_24
(
dst
,
0
,
0
),
*
dst_pixel
;
DWORD
src_val
;
...
...
@@ -1897,16 +1885,10 @@ static BOOL convert_to_24(dib_info *dst, const dib_info *src, const RECT *src_re
}
break
;
}
default:
FIXME
(
"Unsupported conversion: %d -> 24
\n
"
,
src
->
bit_count
);
return
FALSE
;
}
return
TRUE
;
}
static
BOOL
convert_to_555
(
dib_info
*
dst
,
const
dib_info
*
src
,
const
RECT
*
src_rect
)
static
void
convert_to_555
(
dib_info
*
dst
,
const
dib_info
*
src
,
const
RECT
*
src_rect
)
{
WORD
*
dst_start
=
get_pixel_ptr_16
(
dst
,
0
,
0
),
*
dst_pixel
;
INT
x
,
y
,
pad_size
=
((
dst
->
width
+
1
)
&
~
1
)
*
2
-
(
src_rect
->
right
-
src_rect
->
left
)
*
2
;
...
...
@@ -2145,16 +2127,10 @@ static BOOL convert_to_555(dib_info *dst, const dib_info *src, const RECT *src_r
}
break
;
}
default:
FIXME
(
"Unsupported conversion: %d -> 555
\n
"
,
src
->
bit_count
);
return
FALSE
;
}
return
TRUE
;
}
static
BOOL
convert_to_16
(
dib_info
*
dst
,
const
dib_info
*
src
,
const
RECT
*
src_rect
)
static
void
convert_to_16
(
dib_info
*
dst
,
const
dib_info
*
src
,
const
RECT
*
src_rect
)
{
WORD
*
dst_start
=
get_pixel_ptr_16
(
dst
,
0
,
0
),
*
dst_pixel
;
INT
x
,
y
,
pad_size
=
((
dst
->
width
+
1
)
&
~
1
)
*
2
-
(
src_rect
->
right
-
src_rect
->
left
)
*
2
;
...
...
@@ -2417,13 +2393,7 @@ static BOOL convert_to_16(dib_info *dst, const dib_info *src, const RECT *src_re
}
break
;
}
default:
FIXME
(
"Unsupported conversion: %d -> 16
\n
"
,
src
->
bit_count
);
return
FALSE
;
}
return
TRUE
;
}
static
inline
BOOL
color_tables_match
(
const
dib_info
*
d1
,
const
dib_info
*
d2
)
...
...
@@ -2434,7 +2404,7 @@ static inline BOOL color_tables_match(const dib_info *d1, const dib_info *d2)
return
!
memcmp
(
d1
->
color_table
,
d2
->
color_table
,
d1
->
color_table_size
*
sizeof
(
d1
->
color_table
[
0
]));
}
static
BOOL
convert_to_8
(
dib_info
*
dst
,
const
dib_info
*
src
,
const
RECT
*
src_rect
)
static
void
convert_to_8
(
dib_info
*
dst
,
const
dib_info
*
src
,
const
RECT
*
src_rect
)
{
BYTE
*
dst_start
=
get_pixel_ptr_8
(
dst
,
0
,
0
),
*
dst_pixel
;
INT
x
,
y
,
pad_size
=
((
dst
->
width
+
3
)
&
~
3
)
-
(
src_rect
->
right
-
src_rect
->
left
);
...
...
@@ -2695,16 +2665,10 @@ static BOOL convert_to_8(dib_info *dst, const dib_info *src, const RECT *src_rec
}
break
;
}
default:
FIXME
(
"Unsupported conversion: %d -> 8
\n
"
,
src
->
bit_count
);
return
FALSE
;
}
return
TRUE
;
}
static
BOOL
convert_to_4
(
dib_info
*
dst
,
const
dib_info
*
src
,
const
RECT
*
src_rect
)
static
void
convert_to_4
(
dib_info
*
dst
,
const
dib_info
*
src
,
const
RECT
*
src_rect
)
{
BYTE
*
dst_start
=
get_pixel_ptr_4
(
dst
,
0
,
0
),
*
dst_pixel
,
dst_val
;
INT
x
,
y
,
pad_size
=
((
dst
->
width
+
7
)
&
~
7
)
/
2
-
(
src_rect
->
right
-
src_rect
->
left
+
1
)
/
2
;
...
...
@@ -3088,17 +3052,10 @@ static BOOL convert_to_4(dib_info *dst, const dib_info *src, const RECT *src_rec
}
break
;
}
default:
FIXME
(
"Unsupported conversion: %d -> 4
\n
"
,
src
->
bit_count
);
return
FALSE
;
}
return
TRUE
;
}
static
BOOL
convert_to_1
(
dib_info
*
dst
,
const
dib_info
*
src
,
const
RECT
*
src_rect
)
static
void
convert_to_1
(
dib_info
*
dst
,
const
dib_info
*
src
,
const
RECT
*
src_rect
)
{
BYTE
*
dst_start
=
get_pixel_ptr_1
(
dst
,
0
,
0
),
*
dst_pixel
,
dst_val
;
INT
x
,
y
,
pad_size
=
((
dst
->
width
+
31
)
&
~
31
)
/
8
-
(
src_rect
->
right
-
src_rect
->
left
+
7
)
/
8
;
...
...
@@ -3490,18 +3447,11 @@ static BOOL convert_to_1(dib_info *dst, const dib_info *src, const RECT *src_rec
}
break
;
}
default:
FIXME
(
"Unsupported conversion: %d -> 1
\n
"
,
src
->
bit_count
);
return
FALSE
;
}
return
TRUE
;
}
static
BOOL
convert_to_null
(
dib_info
*
dst
,
const
dib_info
*
src
,
const
RECT
*
src_rect
)
static
void
convert_to_null
(
dib_info
*
dst
,
const
dib_info
*
src
,
const
RECT
*
src_rect
)
{
return
FALSE
;
}
static
BOOL
create_rop_masks_32
(
const
dib_info
*
dib
,
const
dib_info
*
hatch
,
const
rop_mask
*
fg
,
const
rop_mask
*
bg
,
rop_mask_bits
*
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