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
d9a45745
Commit
d9a45745
authored
Nov 07, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Implement the CopyBitmap entry point.
parent
26f5e2c6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
2 deletions
+47
-2
bitmap.c
dlls/winex11.drv/bitmap.c
+36
-0
init.c
dlls/winex11.drv/init.c
+1
-1
x11drv.h
dlls/winex11.drv/x11drv.h
+1
-0
xrender.c
dlls/winex11.drv/xrender.c
+9
-1
No files found.
dlls/winex11.drv/bitmap.c
View file @
d9a45745
...
...
@@ -199,6 +199,42 @@ BOOL X11DRV_CreateBitmap( PHYSDEV dev, HBITMAP hbitmap )
}
/****************************************************************************
* CopyBitmap (X11DRV.@)
*/
BOOL
X11DRV_CopyBitmap
(
HBITMAP
src
,
HBITMAP
dst
)
{
X_PHYSBITMAP
*
phys_src
,
*
phys_dst
;
BITMAP
bitmap
;
if
(
!
(
phys_src
=
X11DRV_get_phys_bitmap
(
src
)))
return
FALSE
;
if
(
!
GetObjectW
(
dst
,
sizeof
(
bitmap
),
&
bitmap
))
return
FALSE
;
TRACE
(
"%p->%p %dx%d %d bpp
\n
"
,
src
,
dst
,
bitmap
.
bmWidth
,
bitmap
.
bmHeight
,
bitmap
.
bmBitsPixel
);
if
(
!
(
phys_dst
=
X11DRV_init_phys_bitmap
(
dst
)))
return
FALSE
;
phys_dst
->
depth
=
phys_src
->
depth
;
phys_dst
->
trueColor
=
phys_src
->
trueColor
;
if
(
phys_dst
->
trueColor
)
phys_dst
->
color_shifts
=
phys_src
->
color_shifts
;
wine_tsx11_lock
();
phys_dst
->
pixmap
=
XCreatePixmap
(
gdi_display
,
root_window
,
bitmap
.
bmWidth
,
bitmap
.
bmHeight
,
phys_dst
->
depth
);
XCopyArea
(
gdi_display
,
phys_src
->
pixmap
,
phys_dst
->
pixmap
,
get_bitmap_gc
(
phys_dst
->
depth
),
0
,
0
,
bitmap
.
bmWidth
,
bitmap
.
bmHeight
,
0
,
0
);
wine_tsx11_unlock
();
if
(
!
phys_dst
->
pixmap
)
{
WARN
(
"Can't create Pixmap
\n
"
);
HeapFree
(
GetProcessHeap
(),
0
,
phys_dst
);
return
FALSE
;
}
return
TRUE
;
}
/***********************************************************************
* DeleteBitmap (X11DRV.@)
*/
...
...
dlls/winex11.drv/init.c
View file @
d9a45745
...
...
@@ -476,7 +476,7 @@ static const struct gdi_dc_funcs x11drv_funcs =
X11DRV_ChoosePixelFormat
,
/* pChoosePixelFormat */
X11DRV_Chord
,
/* pChord */
NULL
,
/* pCloseFigure */
NULL
,
/* pCopyBitmap */
X11DRV_CopyBitmap
,
/* pCopyBitmap */
X11DRV_CreateBitmap
,
/* pCreateBitmap */
X11DRV_CreateCompatibleDC
,
/* pCreateCompatibleDC */
X11DRV_CreateDC
,
/* pCreateDC */
...
...
dlls/winex11.drv/x11drv.h
View file @
d9a45745
...
...
@@ -181,6 +181,7 @@ extern BOOL X11DRV_Arc( PHYSDEV dev, INT left, INT top, INT right,
INT
bottom
,
INT
xstart
,
INT
ystart
,
INT
xend
,
INT
yend
)
DECLSPEC_HIDDEN
;
extern
BOOL
X11DRV_Chord
(
PHYSDEV
dev
,
INT
left
,
INT
top
,
INT
right
,
INT
bottom
,
INT
xstart
,
INT
ystart
,
INT
xend
,
INT
yend
)
DECLSPEC_HIDDEN
;
extern
BOOL
X11DRV_CopyBitmap
(
HBITMAP
src
,
HBITMAP
dst
)
DECLSPEC_HIDDEN
;
extern
BOOL
X11DRV_CreateBitmap
(
PHYSDEV
dev
,
HBITMAP
hbitmap
)
DECLSPEC_HIDDEN
;
extern
HBITMAP
X11DRV_CreateDIBSection
(
PHYSDEV
dev
,
HBITMAP
hbitmap
,
BITMAPINFO
*
bmi
,
UINT
usage
)
DECLSPEC_HIDDEN
;
...
...
dlls/winex11.drv/xrender.c
View file @
d9a45745
...
...
@@ -1276,6 +1276,14 @@ static INT xrenderdrv_ExtEscape( PHYSDEV dev, INT escape, INT in_count, LPCVOID
}
/****************************************************************************
* xrenderdrv_CopyBitmap
*/
static
BOOL
xrenderdrv_CopyBitmap
(
HBITMAP
src
,
HBITMAP
dst
)
{
return
X11DRV_CopyBitmap
(
src
,
dst
);
}
/****************************************************************************
* xrenderdrv_CreateBitmap
*/
static
BOOL
xrenderdrv_CreateBitmap
(
PHYSDEV
dev
,
HBITMAP
hbitmap
)
...
...
@@ -3060,7 +3068,7 @@ static const struct gdi_dc_funcs xrender_funcs =
NULL
,
/* pChoosePixelFormat */
NULL
,
/* pChord */
NULL
,
/* pCloseFigure */
NULL
,
/* pCopyBitmap */
xrenderdrv_CopyBitmap
,
/* pCopyBitmap */
xrenderdrv_CreateBitmap
,
/* pCreateBitmap */
xrenderdrv_CreateCompatibleDC
,
/* pCreateCompatibleDC */
xrenderdrv_CreateDC
,
/* pCreateDC */
...
...
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