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
bcca3199
Commit
bcca3199
authored
Oct 31, 2019
by
Ulrich Sibiller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Split.c: scope improvements/code simplification
parent
53b3d4df
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
21 deletions
+7
-21
Split.c
nx-X11/programs/Xserver/hw/nxagent/Split.c
+7
-21
No files found.
nx-X11/programs/Xserver/hw/nxagent/Split.c
View file @
bcca3199
...
...
@@ -71,13 +71,11 @@ DrawablePtr nxagentSplitDrawable(DrawablePtr pDrawable)
void
nxagentInitSplitResources
(
void
)
{
int
resource
;
#ifdef TEST
fprintf
(
stderr
,
"nxagentInitSplitResources: Initializing the split resources.
\n
"
);
#endif
for
(
resource
=
0
;
resource
<
NXNumberOfResources
;
resource
++
)
for
(
int
resource
=
0
;
resource
<
NXNumberOfResources
;
resource
++
)
{
SplitResourcePtr
pResource
=
&
nxagentSplitResources
[
resource
];
...
...
@@ -95,8 +93,6 @@ SplitResourcePtr nxagentAllocSplitResource(void)
{
int
resource
;
SplitResourcePtr
pResource
;
for
(;;)
{
resource
=
NXAllocSplit
(
nxagentDisplay
,
NXAnyResource
);
...
...
@@ -122,7 +118,7 @@ FIXME: Must deal with the case all resources are exausted.
}
}
pResource
=
&
nxagentSplitResources
[
resource
];
SplitResourcePtr
pResource
=
&
nxagentSplitResources
[
resource
];
if
(
pResource
->
pending
!=
0
||
pResource
->
split
!=
NXNoResource
||
pResource
->
unpack
!=
NXNoResource
||
pResource
->
drawable
!=
NULL
||
...
...
@@ -215,13 +211,11 @@ FIXME: This must be implemented.
void
nxagentReleaseAllSplits
(
void
)
{
int
resource
;
#ifdef TEST
fprintf
(
stderr
,
"nxagentReleaseAllSplits: Going to release all the split resources.
\n
"
);
#endif
for
(
resource
=
0
;
resource
<
NXNumberOfResources
;
resource
++
)
for
(
int
resource
=
0
;
resource
<
NXNumberOfResources
;
resource
++
)
{
SplitResourcePtr
pResource
=
&
nxagentSplitResources
[
resource
];
...
...
@@ -327,11 +321,9 @@ static void nxagentCheckResource(SplitResourcePtr pResource, int resource)
int
nxagentCreateSplit
(
DrawablePtr
pDrawable
,
GCPtr
*
pGC
)
{
SplitResourcePtr
pResource
;
pDrawable
=
nxagentSplitDrawable
(
pDrawable
);
pResource
=
nxagentAllocSplitResource
();
SplitResourcePtr
pResource
=
nxagentAllocSplitResource
();
if
(
pDrawable
->
type
==
DRAWABLE_PIXMAP
)
{
...
...
@@ -402,11 +394,9 @@ FIXME: What do we do here?
void
nxagentRegionSplit
(
DrawablePtr
pDrawable
,
RegionPtr
pRegion
)
{
SplitResourcePtr
pResource
;
pDrawable
=
nxagentSplitDrawable
(
pDrawable
);
pResource
=
nxagentSplitResource
(
pDrawable
);
SplitResourcePtr
pResource
=
nxagentSplitResource
(
pDrawable
);
#ifdef TEST
...
...
@@ -445,11 +435,9 @@ void nxagentRegionSplit(DrawablePtr pDrawable, RegionPtr pRegion)
void
nxagentReleaseSplit
(
DrawablePtr
pDrawable
)
{
SplitResourcePtr
pResource
;
pDrawable
=
nxagentSplitDrawable
(
pDrawable
);
pResource
=
nxagentSplitResource
(
pDrawable
);
SplitResourcePtr
pResource
=
nxagentSplitResource
(
pDrawable
);
if
(
pResource
==
NULL
)
{
...
...
@@ -551,11 +539,9 @@ void nxagentReleaseSplit(DrawablePtr pDrawable)
void
nxagentValidateSplit
(
DrawablePtr
pDrawable
,
RegionPtr
pRegion
)
{
SplitResourcePtr
pResource
;
pDrawable
=
nxagentSplitDrawable
(
pDrawable
);
pResource
=
nxagentSplitResource
(
pDrawable
);
SplitResourcePtr
pResource
=
nxagentSplitResource
(
pDrawable
);
if
(
pResource
==
NULL
)
{
...
...
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