Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
09eb59d3
Commit
09eb59d3
authored
Aug 03, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Set the initial bits of a bitmap from the gdi side.
parent
10784991
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
22 deletions
+24
-22
bitmap.c
dlls/gdi32/bitmap.c
+12
-2
driver.c
dlls/gdi32/driver.c
+1
-1
bitmap.c
dlls/winex11.drv/bitmap.c
+8
-16
x11drv.h
dlls/winex11.drv/x11drv.h
+1
-1
gdi_driver.h
include/wine/gdi_driver.h
+2
-2
No files found.
dlls/gdi32/bitmap.c
View file @
09eb59d3
...
...
@@ -657,6 +657,12 @@ HBITMAP BITMAP_CopyBitmap(HBITMAP hbitmap)
}
static
void
set_initial_bitmap_bits
(
HBITMAP
hbitmap
,
BITMAPOBJ
*
bmp
)
{
if
(
!
bmp
->
bitmap
.
bmBits
)
return
;
SetBitmapBits
(
hbitmap
,
bmp
->
bitmap
.
bmHeight
*
bmp
->
bitmap
.
bmWidthBytes
,
bmp
->
bitmap
.
bmBits
);
}
/***********************************************************************
* BITMAP_SetOwnerDC
*
...
...
@@ -681,8 +687,12 @@ BOOL BITMAP_SetOwnerDC( HBITMAP hbitmap, PHYSDEV physdev )
{
if
(
physdev
->
funcs
->
pCreateBitmap
)
{
ret
=
physdev
->
funcs
->
pCreateBitmap
(
physdev
,
hbitmap
,
bitmap
->
bitmap
.
bmBits
);
if
(
ret
)
bitmap
->
funcs
=
physdev
->
funcs
;
ret
=
physdev
->
funcs
->
pCreateBitmap
(
physdev
,
hbitmap
);
if
(
ret
)
{
bitmap
->
funcs
=
physdev
->
funcs
;
set_initial_bitmap_bits
(
hbitmap
,
bitmap
);
}
}
else
{
...
...
dlls/gdi32/driver.c
View file @
09eb59d3
...
...
@@ -213,7 +213,7 @@ static BOOL nulldrv_Chord( PHYSDEV dev, INT left, INT top, INT right, INT bottom
return
TRUE
;
}
static
BOOL
nulldrv_CreateBitmap
(
PHYSDEV
dev
,
HBITMAP
bitmap
,
LPVOID
bits
)
static
BOOL
nulldrv_CreateBitmap
(
PHYSDEV
dev
,
HBITMAP
bitmap
)
{
return
TRUE
;
}
...
...
dlls/winex11.drv/bitmap.c
View file @
09eb59d3
...
...
@@ -132,7 +132,7 @@ HBITMAP X11DRV_SelectBitmap( PHYSDEV dev, HBITMAP hbitmap )
*
* Returns TRUE on success else FALSE
*/
BOOL
X11DRV_CreateBitmap
(
PHYSDEV
dev
,
HBITMAP
hbitmap
,
LPVOID
bmBits
)
BOOL
X11DRV_CreateBitmap
(
PHYSDEV
dev
,
HBITMAP
hbitmap
)
{
X_PHYSBITMAP
*
physBitmap
;
BITMAP
bitmap
;
...
...
@@ -178,6 +178,13 @@ BOOL X11DRV_CreateBitmap( PHYSDEV dev, HBITMAP hbitmap, LPVOID bmBits )
/* Create the pixmap */
physBitmap
->
pixmap
=
XCreatePixmap
(
gdi_display
,
root_window
,
bitmap
.
bmWidth
,
bitmap
.
bmHeight
,
physBitmap
->
pixmap_depth
);
if
(
physBitmap
->
pixmap
)
{
GC
gc
=
get_bitmap_gc
(
physBitmap
->
pixmap_depth
);
XSetFunction
(
gdi_display
,
gc
,
GXclear
);
XFillRectangle
(
gdi_display
,
physBitmap
->
pixmap
,
gc
,
0
,
0
,
bitmap
.
bmWidth
,
bitmap
.
bmHeight
);
XSetFunction
(
gdi_display
,
gc
,
GXcopy
);
}
wine_tsx11_unlock
();
if
(
!
physBitmap
->
pixmap
)
{
...
...
@@ -185,21 +192,6 @@ BOOL X11DRV_CreateBitmap( PHYSDEV dev, HBITMAP hbitmap, LPVOID bmBits )
HeapFree
(
GetProcessHeap
(),
0
,
physBitmap
);
return
FALSE
;
}
if
(
bmBits
)
/* Set bitmap bits */
{
X11DRV_SetBitmapBits
(
hbitmap
,
bmBits
,
bitmap
.
bmHeight
*
bitmap
.
bmWidthBytes
);
}
else
/* else clear the bitmap */
{
GC
gc
=
get_bitmap_gc
(
physBitmap
->
pixmap_depth
);
wine_tsx11_lock
();
XSetFunction
(
gdi_display
,
gc
,
GXclear
);
XFillRectangle
(
gdi_display
,
physBitmap
->
pixmap
,
gc
,
0
,
0
,
bitmap
.
bmWidth
,
bitmap
.
bmHeight
);
XSetFunction
(
gdi_display
,
gc
,
GXcopy
);
wine_tsx11_unlock
();
}
return
TRUE
;
}
...
...
dlls/winex11.drv/x11drv.h
View file @
09eb59d3
...
...
@@ -187,7 +187,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_CreateBitmap
(
PHYSDEV
dev
,
HBITMAP
hbitmap
,
LPVOID
bmBits
)
DECLSPEC_HIDDEN
;
extern
BOOL
X11DRV_CreateBitmap
(
PHYSDEV
dev
,
HBITMAP
hbitmap
)
DECLSPEC_HIDDEN
;
extern
HBITMAP
X11DRV_CreateDIBSection
(
PHYSDEV
dev
,
HBITMAP
hbitmap
,
const
BITMAPINFO
*
bmi
,
UINT
usage
)
DECLSPEC_HIDDEN
;
extern
BOOL
X11DRV_DeleteBitmap
(
HBITMAP
hbitmap
)
DECLSPEC_HIDDEN
;
...
...
include/wine/gdi_driver.h
View file @
09eb59d3
...
...
@@ -64,7 +64,7 @@ struct gdi_dc_funcs
INT
(
*
pChoosePixelFormat
)(
PHYSDEV
,
const
PIXELFORMATDESCRIPTOR
*
);
BOOL
(
*
pChord
)(
PHYSDEV
,
INT
,
INT
,
INT
,
INT
,
INT
,
INT
,
INT
,
INT
);
BOOL
(
*
pCloseFigure
)(
PHYSDEV
);
BOOL
(
*
pCreateBitmap
)(
PHYSDEV
,
HBITMAP
,
LPVOID
);
BOOL
(
*
pCreateBitmap
)(
PHYSDEV
,
HBITMAP
);
BOOL
(
*
pCreateDC
)(
HDC
,
PHYSDEV
*
,
LPCWSTR
,
LPCWSTR
,
LPCWSTR
,
const
DEVMODEW
*
);
HBITMAP
(
*
pCreateDIBSection
)(
PHYSDEV
,
HBITMAP
,
const
BITMAPINFO
*
,
UINT
);
BOOL
(
*
pDeleteBitmap
)(
HBITMAP
);
...
...
@@ -189,7 +189,7 @@ struct gdi_dc_funcs
};
/* increment this when you change the DC function table */
#define WINE_GDI_DRIVER_VERSION
9
#define WINE_GDI_DRIVER_VERSION
10
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