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
84dd9feb
Commit
84dd9feb
authored
Nov 01, 1998
by
Huw D M Davies
Committed by
Alexandre Julliard
Nov 01, 1998
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A couple of small fixes to my bitmap patch.
parent
3700777e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
6 deletions
+13
-6
bitmap.c
graphics/x11drv/bitmap.c
+6
-6
graphics.c
windows/graphics.c
+7
-0
No files found.
graphics/x11drv/bitmap.c
View file @
84dd9feb
...
@@ -28,11 +28,6 @@
...
@@ -28,11 +28,6 @@
GC
BITMAP_monoGC
=
0
,
BITMAP_colorGC
=
0
;
GC
BITMAP_monoGC
=
0
,
BITMAP_colorGC
=
0
;
#define BITMAP_WIDTH_BYTES(width,bpp) \
(((bpp) == 24) ? (width) * 4 : ( ((bpp) == 15) ? (width) * 2 : \
((width) * (bpp) + 15) / 16 * 2 ))
/***********************************************************************
/***********************************************************************
* X11DRV_BITMAP_Init
* X11DRV_BITMAP_Init
*/
*/
...
@@ -372,6 +367,8 @@ static LONG X11DRV_SetBitmapBits(BITMAPOBJ *bmp, void *bits, LONG count)
...
@@ -372,6 +367,8 @@ static LONG X11DRV_SetBitmapBits(BITMAPOBJ *bmp, void *bits, LONG count)
LPBYTE
sbuf
,
tmpbuffer
;
LPBYTE
sbuf
,
tmpbuffer
;
int
w
,
h
,
pad
,
widthbytes
;
int
w
,
h
,
pad
,
widthbytes
;
TRACE
(
x11drv
,
"(bmp=%p, bits=%p, count=%lx)
\n
"
,
bmp
,
bits
,
count
);
pad
=
BITMAP_GetBitsPadding
(
bmp
->
bitmap
.
bmWidth
,
bmp
->
bitmap
.
bmBitsPixel
);
pad
=
BITMAP_GetBitsPadding
(
bmp
->
bitmap
.
bmWidth
,
bmp
->
bitmap
.
bmBitsPixel
);
if
(
pad
==
-
1
)
if
(
pad
==
-
1
)
...
@@ -381,9 +378,12 @@ static LONG X11DRV_SetBitmapBits(BITMAPOBJ *bmp, void *bits, LONG count)
...
@@ -381,9 +378,12 @@ static LONG X11DRV_SetBitmapBits(BITMAPOBJ *bmp, void *bits, LONG count)
widthbytes
=
(((
bmp
->
bitmap
.
bmWidth
*
bmp
->
bitmap
.
bmBitsPixel
)
+
31
)
/
widthbytes
=
(((
bmp
->
bitmap
.
bmWidth
*
bmp
->
bitmap
.
bmBitsPixel
)
+
31
)
/
32
)
*
4
;
32
)
*
4
;
height
=
bmp
->
bitmap
.
bmHeight
;
height
=
count
/
bmp
->
bitmap
.
bmWidthBytes
;
tmpbuffer
=
(
LPBYTE
)
xmalloc
(
widthbytes
*
height
);
tmpbuffer
=
(
LPBYTE
)
xmalloc
(
widthbytes
*
height
);
TRACE
(
x11drv
,
"h=%ld, w=%d, wb=%d
\n
"
,
height
,
bmp
->
bitmap
.
bmWidth
,
widthbytes
);
EnterCriticalSection
(
&
X11DRV_CritSection
);
EnterCriticalSection
(
&
X11DRV_CritSection
);
image
=
XCreateImage
(
display
,
DefaultVisualOfScreen
(
screen
),
image
=
XCreateImage
(
display
,
DefaultVisualOfScreen
(
screen
),
bmp
->
bitmap
.
bmBitsPixel
,
ZPixmap
,
0
,
tmpbuffer
,
bmp
->
bitmap
.
bmBitsPixel
,
ZPixmap
,
0
,
tmpbuffer
,
...
...
windows/graphics.c
View file @
84dd9feb
...
@@ -80,6 +80,9 @@ BOOL32 GRAPH_DrawBitmap( HDC32 hdc, HBITMAP32 hbitmap,
...
@@ -80,6 +80,9 @@ BOOL32 GRAPH_DrawBitmap( HDC32 hdc, HBITMAP32 hbitmap,
return
FALSE
;
return
FALSE
;
}
}
/* HACK for now */
if
(
!
bmp
->
DDBitmap
)
X11DRV_CreateBitmap
(
hbitmap
);
pbitmap
=
bmp
->
DDBitmap
->
physBitmap
;
pbitmap
=
bmp
->
DDBitmap
->
physBitmap
;
xdest
+=
dc
->
w
.
DCOrgX
;
ydest
+=
dc
->
w
.
DCOrgY
;
xdest
+=
dc
->
w
.
DCOrgX
;
ydest
+=
dc
->
w
.
DCOrgY
;
...
@@ -249,6 +252,10 @@ BOOL32 GRAPH_SelectClipMask( HDC32 hdc, HBITMAP32 hMonoBitmap, INT32 x, INT32 y)
...
@@ -249,6 +252,10 @@ BOOL32 GRAPH_SelectClipMask( HDC32 hdc, HBITMAP32 hMonoBitmap, INT32 x, INT32 y)
GDI_HEAP_UNLOCK
(
hdc
);
GDI_HEAP_UNLOCK
(
hdc
);
return
FALSE
;
return
FALSE
;
}
}
/* HACK for now */
if
(
!
bmp
->
DDBitmap
)
X11DRV_CreateBitmap
(
hMonoBitmap
);
pbitmap
=
bmp
->
DDBitmap
->
physBitmap
;
pbitmap
=
bmp
->
DDBitmap
->
physBitmap
;
TSXSetClipOrigin
(
display
,
dc
->
u
.
x
.
gc
,
dc
->
w
.
DCOrgX
+
x
,
dc
->
w
.
DCOrgY
+
y
);
TSXSetClipOrigin
(
display
,
dc
->
u
.
x
.
gc
,
dc
->
w
.
DCOrgX
+
x
,
dc
->
w
.
DCOrgY
+
y
);
}
}
...
...
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