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
5fc017c4
Commit
5fc017c4
authored
Sep 01, 2009
by
Roderick Colenbrander
Committed by
Alexandre Julliard
Sep 02, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Use ColorShifts from physDev in X11DRV_PALETTE_ToPhysical.
parent
3ad349f3
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
3 deletions
+31
-3
bitmap.c
dlls/winex11.drv/bitmap.c
+13
-1
dib.c
dlls/winex11.drv/dib.c
+9
-1
init.c
dlls/winex11.drv/init.c
+2
-0
palette.c
dlls/winex11.drv/palette.c
+4
-1
x11drv.h
dlls/winex11.drv/x11drv.h
+3
-0
No files found.
dlls/winex11.drv/bitmap.c
View file @
5fc017c4
...
...
@@ -110,6 +110,10 @@ HBITMAP CDECL X11DRV_SelectBitmap( X11DRV_PDEVICE *physDev, HBITMAP hbitmap )
if
(
physDev
->
depth
!=
physBitmap
->
pixmap_depth
)
{
physDev
->
depth
=
physBitmap
->
pixmap_depth
;
if
(
physDev
->
depth
==
1
)
physDev
->
color_shifts
=
NULL
;
else
physDev
->
color_shifts
=
&
physBitmap
->
pixmap_color_shifts
;
wine_tsx11_lock
();
XFreeGC
(
gdi_display
,
physDev
->
gc
);
physDev
->
gc
=
XCreateGC
(
gdi_display
,
physDev
->
drawable
,
0
,
NULL
);
...
...
@@ -158,7 +162,15 @@ BOOL CDECL X11DRV_CreateBitmap( X11DRV_PDEVICE *physDev, HBITMAP hbitmap, LPVOID
/* Create the pixmap */
wine_tsx11_lock
();
physBitmap
->
pixmap_depth
=
(
bitmap
.
bmBitsPixel
==
1
)
?
1
:
screen_depth
;
if
(
bitmap
.
bmBitsPixel
==
1
)
{
physBitmap
->
pixmap_depth
=
1
;
}
else
{
physBitmap
->
pixmap_depth
=
screen_depth
;
physBitmap
->
pixmap_color_shifts
=
X11DRV_PALETTE_default_shifts
;
}
physBitmap
->
pixmap
=
XCreatePixmap
(
gdi_display
,
root_window
,
bitmap
.
bmWidth
,
bitmap
.
bmHeight
,
physBitmap
->
pixmap_depth
);
wine_tsx11_unlock
();
...
...
dlls/winex11.drv/dib.c
View file @
5fc017c4
...
...
@@ -4746,7 +4746,15 @@ HBITMAP CDECL X11DRV_CreateDIBSection( X11DRV_PDEVICE *physDev, HBITMAP hbitmap,
/* create pixmap and X image */
wine_tsx11_lock
();
physBitmap
->
pixmap_depth
=
(
dib
.
dsBm
.
bmBitsPixel
==
1
)
?
1
:
screen_depth
;
if
(
dib
.
dsBm
.
bmBitsPixel
==
1
)
{
physBitmap
->
pixmap_depth
=
1
;
}
else
{
physBitmap
->
pixmap_depth
=
screen_depth
;
physBitmap
->
pixmap_color_shifts
=
X11DRV_PALETTE_default_shifts
;
}
#ifdef HAVE_LIBXXSHM
physBitmap
->
shminfo
.
shmid
=
-
1
;
...
...
dlls/winex11.drv/init.c
View file @
5fc017c4
...
...
@@ -138,6 +138,7 @@ BOOL CDECL X11DRV_CreateDC( HDC hdc, X11DRV_PDEVICE **pdev, LPCWSTR driver, LPCW
physDev
->
bitmap
=
&
BITMAP_stock_phys_bitmap
;
physDev
->
drawable
=
BITMAP_stock_phys_bitmap
.
pixmap
;
physDev
->
depth
=
1
;
physDev
->
color_shifts
=
NULL
;
SetRect
(
&
physDev
->
drawable_rect
,
0
,
0
,
1
,
1
);
physDev
->
dc_rect
=
physDev
->
drawable_rect
;
}
...
...
@@ -146,6 +147,7 @@ BOOL CDECL X11DRV_CreateDC( HDC hdc, X11DRV_PDEVICE **pdev, LPCWSTR driver, LPCW
physDev
->
bitmap
=
NULL
;
physDev
->
drawable
=
root_window
;
physDev
->
depth
=
screen_depth
;
physDev
->
color_shifts
=
&
X11DRV_PALETTE_default_shifts
;
physDev
->
drawable_rect
=
virtual_screen_rect
;
SetRect
(
&
physDev
->
dc_rect
,
0
,
0
,
virtual_screen_rect
.
right
-
virtual_screen_rect
.
left
,
virtual_screen_rect
.
bottom
-
virtual_screen_rect
.
top
);
...
...
dlls/winex11.drv/palette.c
View file @
5fc017c4
...
...
@@ -60,7 +60,7 @@ Colormap X11DRV_PALETTE_PaletteXColormap = 0;
UINT16
X11DRV_PALETTE_PaletteFlags
=
0
;
/* initialize to zero to handle abortive X11DRV_PALETTE_VIRTUAL visuals */
static
ColorShifts
X11DRV_PALETTE_default_shifts
=
{
{
0
,
0
,
0
,},
{
0
,
0
,
0
},
{
0
,
0
,
0
},
{
0
,
0
,
0
},
{
0
,
0
,
0
},
{
0
,
0
,
0
}
};
ColorShifts
X11DRV_PALETTE_default_shifts
=
{
{
0
,
0
,
0
,},
{
0
,
0
,
0
},
{
0
,
0
,
0
},
{
0
,
0
,
0
},
{
0
,
0
,
0
},
{
0
,
0
,
0
}
};
static
int
X11DRV_PALETTE_Graymax
=
0
;
static
int
palette_size
;
...
...
@@ -874,6 +874,9 @@ int X11DRV_PALETTE_ToPhysical( X11DRV_PDEVICE *physDev, COLORREF color )
PALETTEENTRY
entry
;
ColorShifts
*
shifts
=
&
X11DRV_PALETTE_default_shifts
;
if
(
physDev
->
color_shifts
)
shifts
=
physDev
->
color_shifts
;
if
(
X11DRV_PALETTE_PaletteFlags
&
X11DRV_PALETTE_FIXED
)
{
/* there is no colormap limitation; we are going to have to compute
...
...
dlls/winex11.drv/x11drv.h
View file @
5fc017c4
...
...
@@ -118,6 +118,7 @@ typedef struct
Pixmap
pixmap
;
XID
glxpixmap
;
int
pixmap_depth
;
ColorShifts
pixmap_color_shifts
;
/* the following fields are only used for DIB section bitmaps */
int
status
,
p_status
;
/* mapping status */
XImage
*
image
;
/* cached XImage */
...
...
@@ -155,6 +156,7 @@ typedef struct
int
backgroundPixel
;
int
textPixel
;
int
depth
;
/* bit depth of the DC */
ColorShifts
*
color_shifts
;
/* color shifts of the DC */
int
exposures
;
/* count of graphics exposures operations */
int
current_pf
;
Drawable
gl_drawable
;
...
...
@@ -480,6 +482,7 @@ extern UINT16 X11DRV_PALETTE_PaletteFlags;
extern
int
*
X11DRV_PALETTE_PaletteToXPixel
;
extern
int
*
X11DRV_PALETTE_XPixelToPalette
;
extern
ColorShifts
X11DRV_PALETTE_default_shifts
;
extern
int
X11DRV_PALETTE_mapEGAPixel
[
16
];
...
...
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