Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nx-libs
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dimbor
nx-libs
Commits
5db6217c
Commit
5db6217c
authored
Oct 31, 2019
by
Ulrich Sibiller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Visual.c: code improvements/desginated initializers
parent
bcca3199
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
22 deletions
+14
-22
Visual.c
nx-X11/programs/Xserver/hw/nxagent/Visual.c
+14
-22
No files found.
nx-X11/programs/Xserver/hw/nxagent/Visual.c
View file @
5db6217c
...
...
@@ -64,19 +64,17 @@ Visual nxagentAlphaVisual;
Visual
*
nxagentVisual
(
VisualPtr
pVisual
)
{
XVisualInfo
visual
;
int
i
;
visual
.
class
=
pVisual
->
class
;
visual
.
bits_per_rgb
=
pVisual
->
bitsPerRGBValue
;
visual
.
colormap_size
=
pVisual
->
ColormapEntries
;
visual
.
depth
=
pVisual
->
nplanes
;
visual
.
red_mask
=
pVisual
->
redMask
;
visual
.
green_mask
=
pVisual
->
greenMask
;
visual
.
blue_mask
=
pVisual
->
blueMask
;
for
(
i
=
0
;
i
<
nxagentNumVisuals
;
i
++
)
XVisualInfo
visual
=
{
.
class
=
pVisual
->
class
,
.
bits_per_rgb
=
pVisual
->
bitsPerRGBValue
,
.
colormap_size
=
pVisual
->
ColormapEntries
,
.
depth
=
pVisual
->
nplanes
,
.
red_mask
=
pVisual
->
redMask
,
.
green_mask
=
pVisual
->
greenMask
,
.
blue_mask
=
pVisual
->
blueMask
};
for
(
int
i
=
0
;
i
<
nxagentNumVisuals
;
i
++
)
{
if
(
nxagentCompareVisuals
(
visual
,
nxagentVisuals
[
i
])
==
1
)
{
...
...
@@ -89,9 +87,7 @@ Visual *nxagentVisual(VisualPtr pVisual)
Visual
*
nxagentVisualFromID
(
ScreenPtr
pScreen
,
VisualID
visual
)
{
int
i
;
for
(
i
=
0
;
i
<
pScreen
->
numVisuals
;
i
++
)
for
(
int
i
=
0
;
i
<
pScreen
->
numVisuals
;
i
++
)
{
if
(
pScreen
->
visuals
[
i
].
vid
==
visual
)
{
...
...
@@ -104,9 +100,7 @@ Visual *nxagentVisualFromID(ScreenPtr pScreen, VisualID visual)
Colormap
nxagentDefaultVisualColormap
(
Visual
*
visual
)
{
int
i
;
for
(
i
=
0
;
i
<
nxagentNumVisuals
;
i
++
)
for
(
int
i
=
0
;
i
<
nxagentNumVisuals
;
i
++
)
{
if
(
nxagentVisuals
[
i
].
visual
==
visual
)
{
...
...
@@ -126,9 +120,7 @@ Colormap nxagentDefaultVisualColormap(Visual *visual)
Visual
*
nxagentVisualFromDepth
(
ScreenPtr
pScreen
,
int
depth
)
{
int
i
;
for
(
i
=
0
;
i
<
pScreen
->
numVisuals
;
i
++
)
for
(
int
i
=
0
;
i
<
pScreen
->
numVisuals
;
i
++
)
{
if
(
pScreen
->
visuals
[
i
].
nplanes
==
depth
)
{
...
...
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