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
8a9be0a3
Commit
8a9be0a3
authored
Jan 09, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Get rid of the get_bitmap_funcs function.
DIBs no longer use the display driver functions.
parent
66774bab
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
26 deletions
+7
-26
bitmap.c
dlls/gdi32/bitmap.c
+3
-8
brush.c
dlls/gdi32/brush.c
+1
-3
dib.c
dlls/gdi32/dib.c
+3
-9
gdi_private.h
dlls/gdi32/gdi_private.h
+0
-6
No files found.
dlls/gdi32/bitmap.c
View file @
8a9be0a3
...
...
@@ -337,10 +337,8 @@ LONG WINAPI GetBitmapBits(
struct
bitblt_coords
src
;
int
dst_stride
,
max
,
ret
;
BITMAPOBJ
*
bmp
=
GDI_GetObjPtr
(
hbitmap
,
OBJ_BITMAP
);
const
struct
gdi_dc_funcs
*
funcs
;
if
(
!
bmp
)
return
0
;
funcs
=
get_bitmap_funcs
(
bmp
);
dst_stride
=
get_bitmap_stride
(
bmp
->
bitmap
.
bmWidth
,
bmp
->
bitmap
.
bmBitsPixel
);
ret
=
max
=
dst_stride
*
bmp
->
bitmap
.
bmHeight
;
...
...
@@ -356,7 +354,7 @@ LONG WINAPI GetBitmapBits(
src
.
width
=
src
.
visrect
.
right
-
src
.
visrect
.
left
;
src
.
height
=
src
.
visrect
.
bottom
-
src
.
visrect
.
top
;
if
(
!
funcs
->
pGetImage
(
NULL
,
hbitmap
,
info
,
&
src_bits
,
&
src
))
if
(
!
bmp
->
funcs
->
pGetImage
(
NULL
,
hbitmap
,
info
,
&
src_bits
,
&
src
))
{
const
char
*
src_ptr
=
src_bits
.
ptr
;
int
src_stride
=
get_dib_stride
(
info
->
bmiHeader
.
biWidth
,
info
->
bmiHeader
.
biBitCount
);
...
...
@@ -410,15 +408,12 @@ LONG WINAPI SetBitmapBits(
struct
bitblt_coords
src
,
dst
;
struct
gdi_image_bits
src_bits
;
HRGN
clip
=
NULL
;
const
struct
gdi_dc_funcs
*
funcs
;
if
(
!
bits
)
return
0
;
bmp
=
GDI_GetObjPtr
(
hbitmap
,
OBJ_BITMAP
);
if
(
!
bmp
)
return
0
;
funcs
=
get_bitmap_funcs
(
bmp
);
if
(
count
<
0
)
{
WARN
(
"(%d): Negative number of bytes passed???
\n
"
,
count
);
count
=
-
count
;
...
...
@@ -487,14 +482,14 @@ LONG WINAPI SetBitmapBits(
info
->
bmiHeader
.
biWidth
=
0
;
info
->
bmiHeader
.
biHeight
=
0
;
info
->
bmiHeader
.
biSizeImage
=
0
;
err
=
funcs
->
pPutImage
(
NULL
,
hbitmap
,
0
,
info
,
NULL
,
NULL
,
NULL
,
SRCCOPY
);
err
=
bmp
->
funcs
->
pPutImage
(
NULL
,
hbitmap
,
0
,
info
,
NULL
,
NULL
,
NULL
,
SRCCOPY
);
if
(
!
err
||
err
==
ERROR_BAD_FORMAT
)
{
info
->
bmiHeader
.
biWidth
=
bmp
->
bitmap
.
bmWidth
;
info
->
bmiHeader
.
biHeight
=
-
dst
.
height
;
info
->
bmiHeader
.
biSizeImage
=
dst
.
height
*
dst_stride
;
err
=
funcs
->
pPutImage
(
NULL
,
hbitmap
,
clip
,
info
,
&
src_bits
,
&
src
,
&
dst
,
SRCCOPY
);
err
=
bmp
->
funcs
->
pPutImage
(
NULL
,
hbitmap
,
clip
,
info
,
&
src_bits
,
&
src
,
&
dst
,
SRCCOPY
);
}
if
(
err
)
count
=
0
;
...
...
dlls/gdi32/brush.c
View file @
8a9be0a3
...
...
@@ -58,7 +58,6 @@ static const struct gdi_obj_funcs brush_funcs =
/* fetch the contents of the brush bitmap and cache them in the brush pattern */
void
cache_pattern_bits
(
PHYSDEV
physdev
,
struct
brush_pattern
*
pattern
)
{
const
struct
gdi_dc_funcs
*
funcs
;
struct
gdi_image_bits
bits
;
struct
bitblt_coords
src
;
BITMAPINFO
*
info
;
...
...
@@ -76,8 +75,7 @@ void cache_pattern_bits( PHYSDEV physdev, struct brush_pattern *pattern )
src
.
visrect
.
top
=
src
.
y
=
0
;
src
.
visrect
.
right
=
src
.
width
=
bmp
->
bitmap
.
bmWidth
;
src
.
visrect
.
bottom
=
src
.
height
=
bmp
->
bitmap
.
bmHeight
;
funcs
=
get_bitmap_funcs
(
bmp
);
if
(
funcs
->
pGetImage
(
NULL
,
pattern
->
bitmap
,
info
,
&
bits
,
&
src
))
if
(
bmp
->
funcs
->
pGetImage
(
NULL
,
pattern
->
bitmap
,
info
,
&
bits
,
&
src
))
{
HeapFree
(
GetProcessHeap
(),
0
,
info
);
goto
done
;
...
...
dlls/gdi32/dib.c
View file @
8a9be0a3
...
...
@@ -657,7 +657,6 @@ INT WINAPI SetDIBits( HDC hdc, HBITMAP hbitmap, UINT startscan,
struct
bitblt_coords
src
,
dst
;
INT
src_to_dst_offset
;
HRGN
clip
=
0
;
const
struct
gdi_dc_funcs
*
funcs
;
if
(
!
bitmapinfo_from_user_bitmapinfo
(
src_info
,
info
,
coloruse
,
TRUE
)
||
coloruse
>
DIB_PAL_COLORS
)
{
...
...
@@ -715,8 +714,6 @@ INT WINAPI SetDIBits( HDC hdc, HBITMAP hbitmap, UINT startscan,
if
(
lines
<
src
.
visrect
.
bottom
)
src
.
visrect
.
bottom
=
lines
;
}
funcs
=
get_bitmap_funcs
(
bitmap
);
result
=
lines
;
offset_rect
(
&
src
.
visrect
,
0
,
src_to_dst_offset
);
...
...
@@ -736,11 +733,11 @@ INT WINAPI SetDIBits( HDC hdc, HBITMAP hbitmap, UINT startscan,
copy_bitmapinfo
(
dst_info
,
src_info
);
err
=
funcs
->
pPutImage
(
NULL
,
hbitmap
,
clip
,
dst_info
,
&
src_bits
,
&
src
,
&
dst
,
0
);
err
=
bitmap
->
funcs
->
pPutImage
(
NULL
,
hbitmap
,
clip
,
dst_info
,
&
src_bits
,
&
src
,
&
dst
,
0
);
if
(
err
==
ERROR_BAD_FORMAT
)
{
err
=
convert_bits
(
src_info
,
&
src
,
dst_info
,
&
src_bits
,
FALSE
);
if
(
!
err
)
err
=
funcs
->
pPutImage
(
NULL
,
hbitmap
,
clip
,
dst_info
,
&
src_bits
,
&
src
,
&
dst
,
0
);
if
(
!
err
)
err
=
bitmap
->
funcs
->
pPutImage
(
NULL
,
hbitmap
,
clip
,
dst_info
,
&
src_bits
,
&
src
,
&
dst
,
0
);
}
if
(
err
)
result
=
0
;
...
...
@@ -1212,7 +1209,6 @@ INT WINAPI GetDIBits(
BITMAPINFO
*
dst_info
=
(
BITMAPINFO
*
)
dst_bmibuf
;
char
src_bmibuf
[
FIELD_OFFSET
(
BITMAPINFO
,
bmiColors
[
256
]
)];
BITMAPINFO
*
src_info
=
(
BITMAPINFO
*
)
src_bmibuf
;
const
struct
gdi_dc_funcs
*
funcs
;
struct
gdi_image_bits
src_bits
;
struct
bitblt_coords
src
,
dst
;
BOOL
empty_rect
=
FALSE
;
...
...
@@ -1239,8 +1235,6 @@ INT WINAPI GetDIBits(
return
0
;
}
funcs
=
get_bitmap_funcs
(
bmp
);
src
.
visrect
.
left
=
0
;
src
.
visrect
.
top
=
0
;
src
.
visrect
.
right
=
bmp
->
bitmap
.
bmWidth
;
...
...
@@ -1348,7 +1342,7 @@ INT WINAPI GetDIBits(
lines
=
src
.
height
;
}
err
=
funcs
->
pGetImage
(
NULL
,
hbitmap
,
src_info
,
bits
?
&
src_bits
:
NULL
,
bits
?
&
src
:
NULL
);
err
=
bmp
->
funcs
->
pGetImage
(
NULL
,
hbitmap
,
src_info
,
bits
?
&
src_bits
:
NULL
,
bits
?
&
src
:
NULL
);
if
(
err
)
goto
done
;
...
...
dlls/gdi32/gdi_private.h
View file @
8a9be0a3
...
...
@@ -486,12 +486,6 @@ static inline void copy_bitmapinfo( BITMAPINFO *dst, const BITMAPINFO *src )
memcpy
(
dst
,
src
,
get_dib_info_size
(
src
,
DIB_RGB_COLORS
));
}
static
inline
const
struct
gdi_dc_funcs
*
get_bitmap_funcs
(
const
BITMAPOBJ
*
bitmap
)
{
if
(
bitmap
->
dib
)
return
&
dib_driver
;
return
bitmap
->
funcs
;
}
extern
void
free_heap_bits
(
struct
gdi_image_bits
*
bits
)
DECLSPEC_HIDDEN
;
extern
HMODULE
gdi32_module
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