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
6bbc745d
Commit
6bbc745d
authored
Jul 22, 2001
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved the 16-bit pointer to the DIB bits out of the driver-specific
structure and into the main bitmap structure. Removed CreateDIBSection16 from the driver interface.
parent
ef06b4a6
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
29 additions
and
105 deletions
+29
-105
wing.c
dlls/gdi/wing.c
+4
-12
bitmap.c
dlls/ttydrv/bitmap.c
+0
-13
dc.c
dlls/ttydrv/dc.c
+0
-1
ttydrv.h
dlls/ttydrv/ttydrv.h
+0
-2
init.c
dlls/wineps/init.c
+0
-1
init.c
graphics/enhmetafiledrv/init.c
+0
-1
init.c
graphics/metafiledrv/init.c
+0
-1
init.c
graphics/win16drv/init.c
+0
-1
dib.c
graphics/x11drv/dib.c
+1
-45
init.c
graphics/x11drv/init.c
+1
-2
bitmap.h
include/bitmap.h
+1
-0
gdi.h
include/gdi.h
+0
-2
x11drv.h
include/x11drv.h
+0
-5
bitmap.c
objects/bitmap.c
+1
-0
dib.c
objects/dib.c
+21
-19
No files found.
dlls/gdi/wing.c
View file @
6bbc745d
...
...
@@ -6,10 +6,6 @@
#include "config.h"
#ifndef X_DISPLAY_MISSING
#include "x11drv.h"
#endif
/* !defined(X_DISPLAY_MISSING) */
#include "wine/winuser16.h"
#include "bitmap.h"
#include "debugtools.h"
...
...
@@ -89,19 +85,15 @@ HBITMAP16 WINAPI WinGCreateBitmap16(HDC16 hdc, BITMAPINFO *bmpi,
*/
SEGPTR
WINAPI
WinGGetDIBPointer16
(
HBITMAP16
hWinGBitmap
,
BITMAPINFO
*
bmpi
)
{
BITMAPOBJ
*
bmp
=
(
BITMAPOBJ
*
)
GDI_GetObjPtr
(
hWinGBitmap
,
BITMAP_MAGIC
);
BITMAPOBJ
*
bmp
=
(
BITMAPOBJ
*
)
GDI_GetObjPtr
(
hWinGBitmap
,
BITMAP_MAGIC
);
SEGPTR
res
=
0
;
TRACE
(
"(%d,%p)
\n
"
,
hWinGBitmap
,
bmpi
);
if
(
!
bmp
)
return
(
SEGPTR
)
NULL
;
if
(
!
bmp
)
return
0
;
if
(
bmpi
)
FIXME
(
": Todo - implement setting BITMAPINFO
\n
"
);
if
(
bmpi
)
FIXME
(
": Todo - implement setting BITMAPINFO
\n
"
);
#ifndef X_DISPLAY_MISSING
res
=
MAKESEGPTR
(((
X11DRV_DIBSECTION
*
)
bmp
->
dib
)
->
selector
,
0
);
#endif
/* !defined(X_DISPLAY_MISSING) */
res
=
bmp
->
segptr_bits
;
GDI_ReleaseObj
(
hWinGBitmap
);
return
res
;
}
...
...
dlls/ttydrv/bitmap.c
View file @
6bbc745d
...
...
@@ -184,19 +184,6 @@ HBITMAP TTYDRV_BITMAP_CreateDIBSection(
return
(
HBITMAP
)
NULL
;
}
/**********************************************************************
* TTYDRV_BITMAP_CreateDIBSection16
*/
HBITMAP16
TTYDRV_DIB_CreateDIBSection16
(
DC
*
dc
,
BITMAPINFO
*
bmi
,
UINT16
usage
,
SEGPTR
*
bits
,
HANDLE
section
,
DWORD
offset
)
{
FIXME
(
"(%p, %p, %u, %p, 0x%04x, %ld): stub
\n
"
,
dc
,
bmi
,
usage
,
bits
,
section
,
offset
);
return
(
HBITMAP16
)
NULL
;
}
/***********************************************************************
* TTYDRV_BITMAP_DeleteDIBSection
*/
...
...
dlls/ttydrv/dc.c
View file @
6bbc745d
...
...
@@ -33,7 +33,6 @@ static const DC_FUNCTIONS TTYDRV_DC_Driver =
TTYDRV_DC_CreateBitmap
,
/* pCreateBitmap */
TTYDRV_DC_CreateDC
,
/* pCreateDC */
NULL
,
/* pCreateDIBSection */
NULL
,
/* pCreateDIBSection16 */
TTYDRV_DC_DeleteDC
,
/* pDeleteDC */
TTYDRV_DC_DeleteObject
,
/* pDeleteObject */
NULL
,
/* pDescribePixelFormat */
...
...
dlls/ttydrv/ttydrv.h
View file @
6bbc745d
...
...
@@ -45,8 +45,6 @@ extern void TTYDRV_GDI_Finalize(void);
/* TTY GDI bitmap driver */
extern
HBITMAP
TTYDRV_BITMAP_CreateDIBSection
(
struct
tagDC
*
dc
,
BITMAPINFO
*
bmi
,
UINT
usage
,
LPVOID
*
bits
,
HANDLE
section
,
DWORD
offset
);
extern
HBITMAP16
TTYDRV_BITMAP_CreateDIBSection16
(
struct
tagDC
*
dc
,
BITMAPINFO
*
bmi
,
UINT16
usage
,
SEGPTR
*
bits
,
HANDLE
section
,
DWORD
offset
);
extern
INT
TTYDRV_BITMAP_SetDIBits
(
struct
tagBITMAPOBJ
*
bmp
,
struct
tagDC
*
dc
,
UINT
startscan
,
UINT
lines
,
LPCVOID
bits
,
const
BITMAPINFO
*
info
,
UINT
coloruse
,
HBITMAP
hbitmap
);
extern
INT
TTYDRV_BITMAP_GetDIBits
(
struct
tagBITMAPOBJ
*
bmp
,
struct
tagDC
*
dc
,
UINT
startscan
,
UINT
lines
,
LPVOID
bits
,
BITMAPINFO
*
info
,
UINT
coloruse
,
HBITMAP
hbitmap
);
extern
void
TTYDRV_BITMAP_DeleteDIBSection
(
struct
tagBITMAPOBJ
*
bmp
);
...
...
dlls/wineps/init.c
View file @
6bbc745d
...
...
@@ -45,7 +45,6 @@ static const DC_FUNCTIONS PSDRV_Funcs =
NULL
,
/* pCreateBitmap */
PSDRV_CreateDC
,
/* pCreateDC */
NULL
,
/* pCreateDIBSection */
NULL
,
/* pCreateDIBSection16 */
PSDRV_DeleteDC
,
/* pDeleteDC */
NULL
,
/* pDeleteObject */
NULL
,
/* pDescribePixelFormat */
...
...
graphics/enhmetafiledrv/init.c
View file @
6bbc745d
...
...
@@ -32,7 +32,6 @@ static const DC_FUNCTIONS EMFDRV_Funcs =
NULL
,
/* pCreateBitmap */
NULL
,
/* no implementation */
/* pCreateDC */
NULL
,
/* pCreateDIBSection */
NULL
,
/* pCreateDIBSection16 */
NULL
,
/* no implementation */
/* pDeleteDC */
NULL
,
/* pDeleteObject */
NULL
,
/* pDescribePixelFormat */
...
...
graphics/metafiledrv/init.c
View file @
6bbc745d
...
...
@@ -32,7 +32,6 @@ static const DC_FUNCTIONS MFDRV_Funcs =
NULL
,
/* pCreateBitmap */
NULL
,
/* no implementation */
/* pCreateDC */
NULL
,
/* pCreateDIBSection */
NULL
,
/* pCreateDIBSection16 */
NULL
,
/* no implementation */
/* pDeleteDC */
NULL
,
/* pDeleteObject */
NULL
,
/* pDescribePixelFormat */
...
...
graphics/win16drv/init.c
View file @
6bbc745d
...
...
@@ -58,7 +58,6 @@ static const DC_FUNCTIONS WIN16DRV_Funcs =
NULL
,
/* pCreateBitmap */
WIN16DRV_CreateDC
,
/* pCreateDC */
NULL
,
/* pCreateDIBSection */
NULL
,
/* pCreateDIBSection16 */
NULL
,
/* pDeleteDC */
NULL
,
/* pDeleteObject */
NULL
,
/* pDescribePixelFormat */
...
...
graphics/x11drv/dib.c
View file @
6bbc745d
...
...
@@ -25,8 +25,7 @@
#include "x11drv.h"
#include "debugtools.h"
#include "gdi.h"
#include "color.h"
#include "selectors.h"
#include "palette.h"
#include "global.h"
DEFAULT_DEBUG_CHANNEL
(
bitmap
);
...
...
@@ -3732,46 +3731,6 @@ void X11DRV_UnlockDIBSection(DC *dc, BOOL commit)
X11DRV_UnlockDIBSection2
(
dc
->
hBitmap
,
commit
);
}
/***********************************************************************
* X11DRV_DIB_CreateDIBSection16
*/
HBITMAP16
X11DRV_DIB_CreateDIBSection16
(
DC
*
dc
,
BITMAPINFO
*
bmi
,
UINT16
usage
,
SEGPTR
*
bits
,
HANDLE
section
,
DWORD
offset
,
DWORD
ovr_pitch
)
{
HBITMAP
res
=
X11DRV_DIB_CreateDIBSection
(
dc
,
bmi
,
usage
,
NULL
,
section
,
offset
,
ovr_pitch
);
if
(
res
)
{
BITMAPOBJ
*
bmp
=
(
BITMAPOBJ
*
)
GDI_GetObjPtr
(
res
,
BITMAP_MAGIC
);
if
(
bmp
&&
bmp
->
dib
)
{
DIBSECTION
*
dib
=
bmp
->
dib
;
INT
height
=
dib
->
dsBm
.
bmHeight
>=
0
?
dib
->
dsBm
.
bmHeight
:
-
dib
->
dsBm
.
bmHeight
;
/* same as above - only use biSizeImage as the correct size if it a
compressed image and it's currently non-zero. In other cases, use
width * height as the value. */
INT
size
=
dib
->
dsBmih
.
biSizeImage
&&
dib
->
dsBmih
.
biCompression
!=
BI_RGB
?
dib
->
dsBmih
.
biSizeImage
:
dib
->
dsBm
.
bmWidthBytes
*
height
;
if
(
dib
->
dsBm
.
bmBits
)
{
((
X11DRV_DIBSECTION
*
)
bmp
->
dib
)
->
selector
=
SELECTOR_AllocBlock
(
dib
->
dsBm
.
bmBits
,
size
,
WINE_LDT_FLAGS_DATA
);
}
TRACE
(
"ptr = %p, size =%d, selector = %04x, segptr = %ld
\n
"
,
dib
->
dsBm
.
bmBits
,
size
,
((
X11DRV_DIBSECTION
*
)
bmp
->
dib
)
->
selector
,
MAKESEGPTR
(((
X11DRV_DIBSECTION
*
)
bmp
->
dib
)
->
selector
,
0
));
if
(
bits
)
*
bits
=
MAKESEGPTR
(
((
X11DRV_DIBSECTION
*
)
bmp
->
dib
)
->
selector
,
0
);
}
if
(
bmp
)
GDI_ReleaseObj
(
res
);
}
return
res
;
}
#ifdef HAVE_LIBXXSHM
/***********************************************************************
...
...
@@ -3945,8 +3904,6 @@ HBITMAP X11DRV_DIB_CreateDIBSection(
dib
->
dibSection
.
dsOffset
=
offset
;
dib
->
status
=
DIB_Status_None
;
dib
->
selector
=
0
;
dib
->
nColorMap
=
nColorMap
;
dib
->
colorMap
=
colorMap
;
}
...
...
@@ -4055,7 +4012,6 @@ void X11DRV_DIB_DeleteDIBSection(BITMAPOBJ *bmp)
if
(
dib
->
colorMap
)
HeapFree
(
GetProcessHeap
(),
0
,
dib
->
colorMap
);
if
(
dib
->
selector
)
SELECTOR_FreeBlock
(
dib
->
selector
);
DeleteCriticalSection
(
&
(
dib
->
lock
));
}
...
...
graphics/x11drv/init.c
View file @
6bbc745d
...
...
@@ -11,7 +11,7 @@
#include <string.h>
#include "bitmap.h"
#include "
color
.h"
#include "
palette
.h"
#include "debugtools.h"
#include "winnt.h"
#include "x11drv.h"
...
...
@@ -42,7 +42,6 @@ const DC_FUNCTIONS X11DRV_DC_Funcs =
X11DRV_CreateBitmap
,
/* pCreateBitmap */
X11DRV_CreateDC
,
/* pCreateDC */
X11DRV_DIB_CreateDIBSection
,
/* pCreateDIBSection */
X11DRV_DIB_CreateDIBSection16
,
/* pCreateDIBSection16 */
X11DRV_DeleteDC
,
/* pDeleteDC */
X11DRV_DeleteObject
,
/* pDeleteObject */
X11DRV_DescribePixelFormat
,
/* pDescribePixelFormat */
...
...
include/bitmap.h
View file @
6bbc745d
...
...
@@ -31,6 +31,7 @@ typedef struct tagBITMAPOBJ
void
*
physBitmap
;
/* ptr to device specific data */
/* For device-independent bitmaps: */
DIBSECTION
*
dib
;
SEGPTR
segptr_bits
;
/* segptr to DIB bits */
}
BITMAPOBJ
;
typedef
struct
tagBITMAP_DRIVER
...
...
include/gdi.h
View file @
6bbc745d
...
...
@@ -175,8 +175,6 @@ typedef struct tagDC_FUNCS
BOOL
(
*
pCreateDC
)(
DC
*
,
LPCSTR
,
LPCSTR
,
LPCSTR
,
const
DEVMODEA
*
);
HBITMAP
(
*
pCreateDIBSection
)(
DC
*
,
BITMAPINFO
*
,
UINT
,
LPVOID
*
,
HANDLE
,
DWORD
,
DWORD
);
HBITMAP16
(
*
pCreateDIBSection16
)(
DC
*
,
BITMAPINFO
*
,
UINT16
,
SEGPTR
*
,
HANDLE
,
DWORD
,
DWORD
);
BOOL
(
*
pDeleteDC
)(
DC
*
);
BOOL
(
*
pDeleteObject
)(
HGDIOBJ
);
INT
(
*
pDescribePixelFormat
)(
DC
*
,
INT
,
UINT
,
PIXELFORMATDESCRIPTOR
*
);
...
...
include/x11drv.h
View file @
6bbc745d
...
...
@@ -214,9 +214,6 @@ typedef struct
/* Cached XImage */
XImage
*
image
;
/* Selector for 16-bit access to bits */
WORD
selector
;
#ifdef HAVE_LIBXXSHM
/* Shared memory segment info */
XShmSegmentInfo
shminfo
;
...
...
@@ -243,8 +240,6 @@ extern void X11DRV_UnlockDIBSection2(HBITMAP bmp,BOOL);
extern
HBITMAP
X11DRV_DIB_CreateDIBSection
(
struct
tagDC
*
dc
,
BITMAPINFO
*
bmi
,
UINT
usage
,
LPVOID
*
bits
,
HANDLE
section
,
DWORD
offset
,
DWORD
ovr_pitch
);
extern
HBITMAP16
X11DRV_DIB_CreateDIBSection16
(
struct
tagDC
*
dc
,
BITMAPINFO
*
bmi
,
UINT16
usage
,
SEGPTR
*
bits
,
HANDLE
section
,
DWORD
offset
,
DWORD
ovr_pitch
);
extern
struct
tagBITMAP_DRIVER
X11DRV_BITMAP_Driver
;
...
...
objects/bitmap.c
View file @
6bbc745d
...
...
@@ -138,6 +138,7 @@ HBITMAP WINAPI CreateBitmap( INT width, INT height, UINT planes,
bmp
->
funcs
=
NULL
;
bmp
->
physBitmap
=
NULL
;
bmp
->
dib
=
NULL
;
bmp
->
segptr_bits
=
0
;
if
(
bits
)
/* Set bitmap bits */
SetBitmapBits
(
hbitmap
,
height
*
bmp
->
bitmap
.
bmWidthBytes
,
...
...
objects/dib.c
View file @
6bbc745d
...
...
@@ -11,6 +11,7 @@
#include "winbase.h"
#include "bitmap.h"
#include "callback.h"
#include "selectors.h"
#include "gdi.h"
#include "debugtools.h"
#include "palette.h"
...
...
@@ -853,29 +854,29 @@ HBITMAP WINAPI CreateDIBitmap( HDC hdc, const BITMAPINFOHEADER *header,
* CreateDIBSection (GDI.489)
*/
HBITMAP16
WINAPI
CreateDIBSection16
(
HDC16
hdc
,
BITMAPINFO
*
bmi
,
UINT16
usage
,
SEGPTR
*
bits
,
HANDLE
section
,
DWORD
offset
)
SEGPTR
*
bits16
,
HANDLE
section
,
DWORD
offset
)
{
HBITMAP16
hbitmap
=
0
;
DC
*
dc
;
BOOL
bDesktopDC
=
FALSE
;
LPVOID
bits32
;
HBITMAP
hbitmap
;
/* If the reference hdc is null, take the desktop dc */
if
(
h
dc
==
0
)
hbitmap
=
CreateDIBSection
(
hdc
,
bmi
,
usage
,
&
bits32
,
section
,
offset
);
if
(
h
bitmap
)
{
hdc
=
CreateCompatibleDC
(
0
);
bDesktopDC
=
TRUE
;
}
if
((
dc
=
DC_GetDCPtr
(
hdc
)))
{
hbitmap
=
dc
->
funcs
->
pCreateDIBSection16
(
dc
,
bmi
,
usage
,
bits
,
section
,
offset
,
0
);
GDI_ReleaseObj
(
hdc
);
BITMAPOBJ
*
bmp
=
(
BITMAPOBJ
*
)
GDI_GetObjPtr
(
hbitmap
,
BITMAP_MAGIC
);
if
(
bmp
&&
bmp
->
dib
&&
bits32
)
{
BITMAPINFOHEADER
*
bi
=
&
bmi
->
bmiHeader
;
INT
height
=
bi
->
biHeight
>=
0
?
bi
->
biHeight
:
-
bi
->
biHeight
;
INT
width_bytes
=
DIB_GetDIBWidthBytes
(
bi
->
biWidth
,
bi
->
biBitCount
);
INT
size
=
(
bi
->
biSizeImage
&&
bi
->
biCompression
!=
BI_RGB
)
?
bi
->
biSizeImage
:
width_bytes
*
height
;
WORD
sel
=
SELECTOR_AllocBlock
(
bits32
,
size
,
WINE_LDT_FLAGS_DATA
);
bmp
->
segptr_bits
=
MAKESEGPTR
(
sel
,
0
);
if
(
bits16
)
*
bits16
=
bmp
->
segptr_bits
;
}
if
(
bmp
)
GDI_ReleaseObj
(
hbitmap
);
}
if
(
bDesktopDC
)
DeleteDC
(
hdc
);
return
hbitmap
;
}
...
...
@@ -945,6 +946,7 @@ void DIB_DeleteDIBSection( BITMAPOBJ *bmp )
HeapFree
(
GetProcessHeap
(),
0
,
dib
);
bmp
->
dib
=
NULL
;
if
(
bmp
->
segptr_bits
)
SELECTOR_FreeBlock
(
SELECTOROF
(
bmp
->
segptr_bits
)
);
}
}
...
...
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