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
c819e4bd
Commit
c819e4bd
authored
Sep 14, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Add a null driver fallback for AlphaBlend, using a new BlendImage driver entry point.
parent
27516bab
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
59 additions
and
6 deletions
+59
-6
bitblt.c
dlls/gdi32/bitblt.c
+44
-1
dc.c
dlls/gdi32/dibdrv/dc.c
+1
-0
driver.c
dlls/gdi32/driver.c
+5
-4
init.c
dlls/gdi32/enhmfdrv/init.c
+1
-0
gdi_private.h
dlls/gdi32/gdi_private.h
+2
-0
init.c
dlls/gdi32/mfdrv/init.c
+1
-0
init.c
dlls/wineps.drv/init.c
+1
-0
init.c
dlls/winex11.drv/init.c
+1
-0
xrender.c
dlls/winex11.drv/xrender.c
+1
-0
gdi_driver.h
include/wine/gdi_driver.h
+2
-1
No files found.
dlls/gdi32/bitblt.c
View file @
c819e4bd
...
...
@@ -196,7 +196,10 @@ static DWORD stretch_bits( const BITMAPINFO *src_info, struct bitblt_coords *src
return
err
;
}
/* nulldrv fallback implementation using StretchDIBits */
/***********************************************************************
* null driver fallback implementations
*/
BOOL
nulldrv_StretchBlt
(
PHYSDEV
dst_dev
,
struct
bitblt_coords
*
dst
,
PHYSDEV
src_dev
,
struct
bitblt_coords
*
src
,
DWORD
rop
)
{
...
...
@@ -267,6 +270,46 @@ BOOL nulldrv_StretchBlt( PHYSDEV dst_dev, struct bitblt_coords *dst,
return
!
err
;
}
BOOL
nulldrv_AlphaBlend
(
PHYSDEV
dst_dev
,
struct
bitblt_coords
*
dst
,
PHYSDEV
src_dev
,
struct
bitblt_coords
*
src
,
BLENDFUNCTION
func
)
{
DC
*
dc_src
,
*
dc_dst
=
get_nulldrv_dc
(
dst_dev
);
char
src_buffer
[
FIELD_OFFSET
(
BITMAPINFO
,
bmiColors
[
256
]
)];
char
dst_buffer
[
FIELD_OFFSET
(
BITMAPINFO
,
bmiColors
[
256
]
)];
BITMAPINFO
*
src_info
=
(
BITMAPINFO
*
)
src_buffer
;
BITMAPINFO
*
dst_info
=
(
BITMAPINFO
*
)
dst_buffer
;
DWORD
err
;
struct
gdi_image_bits
bits
;
if
(
!
(
dc_src
=
get_dc_ptr
(
src_dev
->
hdc
)))
return
FALSE
;
src_dev
=
GET_DC_PHYSDEV
(
dc_src
,
pGetImage
);
err
=
src_dev
->
funcs
->
pGetImage
(
src_dev
,
0
,
src_info
,
&
bits
,
src
);
release_dc_ptr
(
dc_src
);
if
(
err
)
return
FALSE
;
dst_dev
=
GET_DC_PHYSDEV
(
dc_dst
,
pBlendImage
);
memcpy
(
dst_info
,
src_info
,
FIELD_OFFSET
(
BITMAPINFO
,
bmiColors
[
256
]
));
err
=
dst_dev
->
funcs
->
pBlendImage
(
dst_dev
,
dst_info
,
&
bits
,
src
,
dst
,
func
);
if
(
err
==
ERROR_BAD_FORMAT
)
{
err
=
convert_bits
(
src_info
,
src
,
dst_info
,
&
bits
);
if
(
!
err
)
err
=
dst_dev
->
funcs
->
pBlendImage
(
dst_dev
,
dst_info
,
&
bits
,
src
,
dst
,
func
);
}
if
(
err
==
ERROR_TRANSFORM_NOT_SUPPORTED
&&
((
src
->
width
!=
dst
->
width
)
||
(
src
->
height
!=
dst
->
height
)))
{
memcpy
(
src_info
,
dst_info
,
FIELD_OFFSET
(
BITMAPINFO
,
bmiColors
[
256
]
));
err
=
stretch_bits
(
src_info
,
src
,
dst_info
,
dst
,
&
bits
,
COLORONCOLOR
);
if
(
!
err
)
err
=
dst_dev
->
funcs
->
pBlendImage
(
dst_dev
,
dst_info
,
&
bits
,
src
,
dst
,
func
);
}
if
(
bits
.
free
)
bits
.
free
(
&
bits
);
return
!
err
;
}
/***********************************************************************
* PatBlt (GDI32.@)
*/
...
...
dlls/gdi32/dibdrv/dc.c
View file @
c819e4bd
...
...
@@ -506,6 +506,7 @@ const DC_FUNCTIONS dib_driver =
NULL
,
/* pArc */
NULL
,
/* pArcTo */
NULL
,
/* pBeginPath */
NULL
,
/* pBlendImage */
NULL
,
/* pChoosePixelFormat */
NULL
,
/* pChord */
NULL
,
/* pCloseFigure */
...
...
dlls/gdi32/driver.c
View file @
c819e4bd
...
...
@@ -190,14 +190,14 @@ static INT nulldrv_AbortDoc( PHYSDEV dev )
return
0
;
}
static
BOOL
nulldrv_A
lphaBlend
(
PHYSDEV
dst_dev
,
struct
bitblt_coords
*
dst
,
PHYSDEV
src_dev
,
struct
bitblt_coords
*
src
,
BLENDFUNCTION
func
)
static
BOOL
nulldrv_A
rc
(
PHYSDEV
dev
,
INT
left
,
INT
top
,
INT
right
,
INT
bottom
,
INT
xstart
,
INT
ystart
,
INT
xend
,
INT
yend
)
{
return
TRUE
;
}
static
BOOL
nulldrv_Arc
(
PHYSDEV
dev
,
INT
left
,
INT
top
,
INT
right
,
INT
bottom
,
INT
xstart
,
INT
ystart
,
INT
xend
,
INT
yend
)
static
DWORD
nulldrv_BlendImage
(
PHYSDEV
dev
,
BITMAPINFO
*
info
,
const
struct
gdi_image_bits
*
bits
,
struct
bitblt_coords
*
src
,
struct
bitblt_coords
*
dst
,
BLENDFUNCTION
func
)
{
return
TRUE
;
}
...
...
@@ -666,6 +666,7 @@ const DC_FUNCTIONS null_driver =
nulldrv_Arc
,
/* pArc */
nulldrv_ArcTo
,
/* pArcTo */
nulldrv_BeginPath
,
/* pBeginPath */
nulldrv_BlendImage
,
/* pBlendImage */
nulldrv_ChoosePixelFormat
,
/* pChoosePixelFormat */
nulldrv_Chord
,
/* pChord */
nulldrv_CloseFigure
,
/* pCloseFigure */
...
...
dlls/gdi32/enhmfdrv/init.c
View file @
c819e4bd
...
...
@@ -43,6 +43,7 @@ static const DC_FUNCTIONS EMFDRV_Funcs =
EMFDRV_Arc
,
/* pArc */
NULL
,
/* pArcTo */
EMFDRV_BeginPath
,
/* pBeginPath */
NULL
,
/* pBlendImage */
NULL
,
/* pChoosePixelFormat */
EMFDRV_Chord
,
/* pChord */
EMFDRV_CloseFigure
,
/* pCloseFigure */
...
...
dlls/gdi32/gdi_private.h
View file @
c819e4bd
...
...
@@ -383,6 +383,8 @@ static inline void release_wine_region(HRGN rgn)
/* null driver entry points */
extern
BOOL
nulldrv_AbortPath
(
PHYSDEV
dev
)
DECLSPEC_HIDDEN
;
extern
BOOL
nulldrv_AlphaBlend
(
PHYSDEV
dst_dev
,
struct
bitblt_coords
*
dst
,
PHYSDEV
src_dev
,
struct
bitblt_coords
*
src
,
BLENDFUNCTION
func
)
DECLSPEC_HIDDEN
;
extern
BOOL
nulldrv_AngleArc
(
PHYSDEV
dev
,
INT
x
,
INT
y
,
DWORD
radius
,
FLOAT
start
,
FLOAT
sweep
)
DECLSPEC_HIDDEN
;
extern
BOOL
nulldrv_ArcTo
(
PHYSDEV
dev
,
INT
left
,
INT
top
,
INT
right
,
INT
bottom
,
INT
xstart
,
INT
ystart
,
INT
xend
,
INT
yend
)
DECLSPEC_HIDDEN
;
extern
BOOL
nulldrv_BeginPath
(
PHYSDEV
dev
)
DECLSPEC_HIDDEN
;
...
...
dlls/gdi32/mfdrv/init.c
View file @
c819e4bd
...
...
@@ -88,6 +88,7 @@ static const DC_FUNCTIONS MFDRV_Funcs =
MFDRV_Arc
,
/* pArc */
NULL
,
/* pArcTo */
MFDRV_BeginPath
,
/* pBeginPath */
NULL
,
/* pBlendImage */
NULL
,
/* pChoosePixelFormat */
MFDRV_Chord
,
/* pChord */
MFDRV_CloseFigure
,
/* pCloseFigure */
...
...
dlls/wineps.drv/init.c
View file @
c819e4bd
...
...
@@ -825,6 +825,7 @@ static const struct gdi_dc_funcs psdrv_funcs =
PSDRV_Arc
,
/* pArc */
NULL
,
/* pArcTo */
NULL
,
/* pBeginPath */
NULL
,
/* pBlendImage */
NULL
,
/* pChoosePixelFormat */
PSDRV_Chord
,
/* pChord */
NULL
,
/* pCloseFigure */
...
...
dlls/winex11.drv/init.c
View file @
c819e4bd
...
...
@@ -472,6 +472,7 @@ static const struct gdi_dc_funcs x11drv_funcs =
X11DRV_Arc
,
/* pArc */
NULL
,
/* pArcTo */
NULL
,
/* pBeginPath */
NULL
,
/* pBlendImage */
X11DRV_ChoosePixelFormat
,
/* pChoosePixelFormat */
X11DRV_Chord
,
/* pChord */
NULL
,
/* pCloseFigure */
...
...
dlls/winex11.drv/xrender.c
View file @
c819e4bd
...
...
@@ -2598,6 +2598,7 @@ static const struct gdi_dc_funcs xrender_funcs =
NULL
,
/* pArc */
NULL
,
/* pArcTo */
NULL
,
/* pBeginPath */
NULL
,
/* pBlendImage */
NULL
,
/* pChoosePixelFormat */
NULL
,
/* pChord */
NULL
,
/* pCloseFigure */
...
...
include/wine/gdi_driver.h
View file @
c819e4bd
...
...
@@ -61,6 +61,7 @@ struct gdi_dc_funcs
BOOL
(
*
pArc
)(
PHYSDEV
,
INT
,
INT
,
INT
,
INT
,
INT
,
INT
,
INT
,
INT
);
BOOL
(
*
pArcTo
)(
PHYSDEV
,
INT
,
INT
,
INT
,
INT
,
INT
,
INT
,
INT
,
INT
);
BOOL
(
*
pBeginPath
)(
PHYSDEV
);
DWORD
(
*
pBlendImage
)(
PHYSDEV
,
BITMAPINFO
*
,
const
struct
gdi_image_bits
*
,
struct
bitblt_coords
*
,
struct
bitblt_coords
*
,
BLENDFUNCTION
);
INT
(
*
pChoosePixelFormat
)(
PHYSDEV
,
const
PIXELFORMATDESCRIPTOR
*
);
BOOL
(
*
pChord
)(
PHYSDEV
,
INT
,
INT
,
INT
,
INT
,
INT
,
INT
,
INT
,
INT
);
BOOL
(
*
pCloseFigure
)(
PHYSDEV
);
...
...
@@ -189,7 +190,7 @@ struct gdi_dc_funcs
};
/* increment this when you change the DC function table */
#define WINE_GDI_DRIVER_VERSION 1
3
#define WINE_GDI_DRIVER_VERSION 1
4
static
inline
PHYSDEV
get_physdev_entry_point
(
PHYSDEV
dev
,
size_t
offset
)
{
...
...
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