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
014ec638
Commit
014ec638
authored
Sep 26, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Remove some unused palette code.
parent
3c57f113
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
41 deletions
+5
-41
palette.c
dlls/winex11.drv/palette.c
+5
-39
x11drv.h
dlls/winex11.drv/x11drv.h
+0
-2
No files found.
dlls/winex11.drv/palette.c
View file @
014ec638
...
...
@@ -134,20 +134,12 @@ static void palette_set_mapping( HPALETTE hpal, int *mapping )
*/
int
X11DRV_PALETTE_Init
(
void
)
{
int
mask
,
white
,
black
;
int
monoPlane
;
int
*
mapping
;
PALETTEENTRY
sys_pal_template
[
NB_RESERVED_COLORS
];
TRACE
(
"initializing palette manager...
\n
"
);
palette_context
=
XUniqueContext
();
white
=
WhitePixel
(
gdi_display
,
DefaultScreen
(
gdi_display
)
);
black
=
BlackPixel
(
gdi_display
,
DefaultScreen
(
gdi_display
)
);
monoPlane
=
1
;
for
(
mask
=
1
;
!
((
white
&
mask
)
^
(
black
&
mask
));
mask
<<=
1
)
monoPlane
++
;
X11DRV_PALETTE_PaletteFlags
=
(
white
&
mask
)
?
X11DRV_PALETTE_WHITESET
:
0
;
palette_size
=
default_visual
.
colormap_size
;
switch
(
default_visual
.
class
)
...
...
@@ -165,11 +157,7 @@ int X11DRV_PALETTE_Init(void)
default_visual
.
visual
,
AllocAll
);
if
(
default_colormap
)
{
X11DRV_PALETTE_PaletteFlags
|=
(
X11DRV_PALETTE_PRIVATE
|
X11DRV_PALETTE_WHITESET
);
monoPlane
=
1
;
for
(
white
=
palette_size
-
1
;
!
(
white
&
1
);
white
>>=
1
)
monoPlane
++
;
X11DRV_PALETTE_PaletteFlags
|=
X11DRV_PALETTE_PRIVATE
;
if
(
root_window
!=
DefaultRootWindow
(
gdi_display
)
)
{
...
...
@@ -187,29 +175,11 @@ int X11DRV_PALETTE_Init(void)
case
TrueColor
:
X11DRV_PALETTE_PaletteFlags
|=
X11DRV_PALETTE_VIRTUAL
;
case
StaticColor
:
{
int
*
depths
,
nrofdepths
;
/* FIXME: hack to detect XFree32 XF_VGA16 ... We just have
* depths 1 and 4
*/
depths
=
XListDepths
(
gdi_display
,
DefaultScreen
(
gdi_display
),
&
nrofdepths
);
if
((
nrofdepths
==
2
)
&&
((
depths
[
0
]
==
4
)
||
depths
[
1
]
==
4
))
{
monoPlane
=
1
;
for
(
white
=
palette_size
-
1
;
!
(
white
&
1
);
white
>>=
1
)
monoPlane
++
;
X11DRV_PALETTE_PaletteFlags
=
(
white
&
mask
)
?
X11DRV_PALETTE_WHITESET
:
0
;
}
else
{
case
StaticColor
:
X11DRV_PALETTE_PaletteFlags
|=
X11DRV_PALETTE_FIXED
;
X11DRV_PALETTE_ComputeColorShifts
(
&
X11DRV_PALETTE_default_shifts
,
default_visual
.
red_mask
,
default_visual
.
green_mask
,
default_visual
.
blue_mask
);
}
XFree
(
depths
);
break
;
}
}
GetPaletteEntries
(
GetStockObject
(
DEFAULT_PALETTE
),
0
,
NB_RESERVED_COLORS
,
sys_pal_template
);
if
(
X11DRV_PALETTE_PaletteFlags
&
X11DRV_PALETTE_VIRTUAL
)
{
...
...
@@ -217,6 +187,8 @@ int X11DRV_PALETTE_Init(void)
}
else
{
GetPaletteEntries
(
GetStockObject
(
DEFAULT_PALETTE
),
0
,
NB_RESERVED_COLORS
,
sys_pal_template
);
if
((
mapping
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
int
)
*
NB_RESERVED_COLORS
)))
palette_set_mapping
(
GetStockObject
(
DEFAULT_PALETTE
),
mapping
);
...
...
@@ -743,12 +715,6 @@ COLORREF X11DRV_PALETTE_ToLogical(X11DRV_PDEVICE *physDev, int pixel)
{
XColor
color
;
#if 0
/* truecolor visual */
if (screen_depth >= 24) return pixel;
#endif
/* check for hicolor visuals first */
if
(
(
X11DRV_PALETTE_PaletteFlags
&
X11DRV_PALETTE_FIXED
)
&&
!
X11DRV_PALETTE_Graymax
)
...
...
@@ -969,7 +935,7 @@ int X11DRV_PALETTE_ToPhysical( X11DRV_PDEVICE *physDev, COLORREF color )
/***********************************************************************
* X11DRV_PALETTE_LookupPixel
*/
int
X11DRV_PALETTE_LookupPixel
(
ColorShifts
*
shifts
,
COLORREF
color
)
static
int
X11DRV_PALETTE_LookupPixel
(
ColorShifts
*
shifts
,
COLORREF
color
)
{
unsigned
char
spec_type
=
color
>>
24
;
...
...
dlls/winex11.drv/x11drv.h
View file @
014ec638
...
...
@@ -243,7 +243,6 @@ extern Display *gdi_display DECLSPEC_HIDDEN; /* display to use for all GDI func
#define X11DRV_PALETTE_VIRTUAL 0x0002
/* no mapping needed - pixel == pixel color */
#define X11DRV_PALETTE_PRIVATE 0x1000
/* private colormap, identity mapping */
#define X11DRV_PALETTE_WHITESET 0x2000
extern
UINT16
X11DRV_PALETTE_PaletteFlags
DECLSPEC_HIDDEN
;
...
...
@@ -259,7 +258,6 @@ extern BOOL X11DRV_IsSolidColor(COLORREF color) DECLSPEC_HIDDEN;
extern
COLORREF
X11DRV_PALETTE_ToLogical
(
X11DRV_PDEVICE
*
physDev
,
int
pixel
)
DECLSPEC_HIDDEN
;
extern
int
X11DRV_PALETTE_ToPhysical
(
X11DRV_PDEVICE
*
physDev
,
COLORREF
color
)
DECLSPEC_HIDDEN
;
extern
COLORREF
X11DRV_PALETTE_GetColor
(
X11DRV_PDEVICE
*
physDev
,
COLORREF
color
)
DECLSPEC_HIDDEN
;
extern
int
X11DRV_PALETTE_LookupPixel
(
ColorShifts
*
shifts
,
COLORREF
color
)
DECLSPEC_HIDDEN
;
extern
void
X11DRV_PALETTE_ComputeColorShifts
(
ColorShifts
*
shifts
,
unsigned
long
redMask
,
unsigned
long
greenMask
,
unsigned
long
blueMask
)
DECLSPEC_HIDDEN
;
/* GDI escapes */
...
...
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