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
5b6da1aa
You need to sign in or sign up before continuing.
Commit
5b6da1aa
authored
Oct 28, 2019
by
Ulrich Sibiller
Committed by
Mike Gabriel
Jan 05, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NXrender.c: mark NX changes
parent
730876f8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
91 additions
and
20 deletions
+91
-20
NXrender.c
nx-X11/programs/Xserver/hw/nxagent/NXrender.c
+91
-20
No files found.
nx-X11/programs/Xserver/hw/nxagent/NXrender.c
View file @
5b6da1aa
...
@@ -124,7 +124,9 @@ extern void nxagentRenderCreateConicalGradient(PicturePtr pPicture,
...
@@ -124,7 +124,9 @@ extern void nxagentRenderCreateConicalGradient(PicturePtr pPicture,
xFixed
*
stops
,
xFixed
*
stops
,
xRenderColor
*
colors
);
xRenderColor
*
colors
);
#ifdef NXAGENT_SERVER
extern
int
nxagentAlphaEnabled
;
extern
int
nxagentAlphaEnabled
;
#endif
/*
/*
* The void pointer is actually a XGlyphElt8.
* The void pointer is actually a XGlyphElt8.
...
@@ -141,8 +143,13 @@ ProcRenderQueryVersion (ClientPtr client)
...
@@ -141,8 +143,13 @@ ProcRenderQueryVersion (ClientPtr client)
.
type
=
X_Reply
,
.
type
=
X_Reply
,
.
sequenceNumber
=
client
->
sequence
,
.
sequenceNumber
=
client
->
sequence
,
.
length
=
0
,
.
length
=
0
,
#ifdef NXAGENT_SERVER
.
majorVersion
=
nxagentRenderVersionMajor
,
.
majorVersion
=
nxagentRenderVersionMajor
,
.
minorVersion
=
nxagentRenderVersionMinor
.
minorVersion
=
nxagentRenderVersionMinor
#else
.
majorVersion
=
SERVER_RENDER_MAJOR_VERSION
,
.
minorVersion
=
SERVER_RENDER_MINOR_VERSION
#endif
};
};
REQUEST
(
xRenderQueryVersionReq
);
REQUEST
(
xRenderQueryVersionReq
);
...
@@ -262,7 +269,11 @@ ProcRenderQueryPictFormats (ClientPtr client)
...
@@ -262,7 +269,11 @@ ProcRenderQueryPictFormats (ClientPtr client)
pictForm
->
direct
.
greenMask
=
pFormat
->
direct
.
greenMask
;
pictForm
->
direct
.
greenMask
=
pFormat
->
direct
.
greenMask
;
pictForm
->
direct
.
blue
=
pFormat
->
direct
.
blue
;
pictForm
->
direct
.
blue
=
pFormat
->
direct
.
blue
;
pictForm
->
direct
.
blueMask
=
pFormat
->
direct
.
blueMask
;
pictForm
->
direct
.
blueMask
=
pFormat
->
direct
.
blueMask
;
#ifdef NXAGENT_SERVER
pictForm
->
direct
.
alpha
=
nxagentAlphaEnabled
?
pFormat
->
direct
.
alpha
:
0
;
pictForm
->
direct
.
alpha
=
nxagentAlphaEnabled
?
pFormat
->
direct
.
alpha
:
0
;
#else
pictForm
->
direct
.
alpha
=
pFormat
->
direct
.
alpha
;
#endif
pictForm
->
direct
.
alphaMask
=
pFormat
->
direct
.
alphaMask
;
pictForm
->
direct
.
alphaMask
=
pFormat
->
direct
.
alphaMask
;
if
(
pFormat
->
type
==
PictTypeIndexed
&&
pFormat
->
index
.
pColormap
)
if
(
pFormat
->
type
==
PictTypeIndexed
&&
pFormat
->
index
.
pColormap
)
pictForm
->
colormap
=
pFormat
->
index
.
pColormap
->
mid
;
pictForm
->
colormap
=
pFormat
->
index
.
pColormap
->
mid
;
...
@@ -409,7 +420,10 @@ ProcRenderCreatePicture (ClientPtr client)
...
@@ -409,7 +420,10 @@ ProcRenderCreatePicture (ClientPtr client)
&
error
);
&
error
);
if
(
!
pPicture
)
if
(
!
pPicture
)
return
error
;
return
error
;
#ifdef NXAGENT_SERVER
/* FIXME: shouldn't this be integrated into CreatePicture? */
nxagentCreatePicture
(
pPicture
,
stuff
->
mask
);
nxagentCreatePicture
(
pPicture
,
stuff
->
mask
);
#endif
if
(
!
AddResource
(
stuff
->
pid
,
PictureType
,
(
void
*
)
pPicture
))
if
(
!
AddResource
(
stuff
->
pid
,
PictureType
,
(
void
*
)
pPicture
))
return
BadAlloc
;
return
BadAlloc
;
...
@@ -422,7 +436,6 @@ ProcRenderChangePicture (ClientPtr client)
...
@@ -422,7 +436,6 @@ ProcRenderChangePicture (ClientPtr client)
PicturePtr
pPicture
;
PicturePtr
pPicture
;
REQUEST
(
xRenderChangePictureReq
);
REQUEST
(
xRenderChangePictureReq
);
int
len
;
int
len
;
int
error
;
REQUEST_AT_LEAST_SIZE
(
xRenderChangePictureReq
);
REQUEST_AT_LEAST_SIZE
(
xRenderChangePictureReq
);
VERIFY_PICTURE
(
pPicture
,
stuff
->
picture
,
client
,
DixWriteAccess
,
VERIFY_PICTURE
(
pPicture
,
stuff
->
picture
,
client
,
DixWriteAccess
,
...
@@ -432,12 +445,19 @@ ProcRenderChangePicture (ClientPtr client)
...
@@ -432,12 +445,19 @@ ProcRenderChangePicture (ClientPtr client)
if
(
Ones
(
stuff
->
mask
)
!=
len
)
if
(
Ones
(
stuff
->
mask
)
!=
len
)
return
BadLength
;
return
BadLength
;
error
=
ChangePicture
(
pPicture
,
stuff
->
mask
,
(
XID
*
)
(
stuff
+
1
),
#ifdef NXAGENT_SERVER
{
int
error
=
ChangePicture
(
pPicture
,
stuff
->
mask
,
(
XID
*
)
(
stuff
+
1
),
(
DevUnion
*
)
0
,
client
);
(
DevUnion
*
)
0
,
client
);
nxagentChangePicture
(
pPicture
,
stuff
->
mask
);
nxagentChangePicture
(
pPicture
,
stuff
->
mask
);
return
error
;
return
error
;
}
#else
return
ChangePicture
(
pPicture
,
stuff
->
mask
,
(
XID
*
)
(
stuff
+
1
),
(
DevUnion
*
)
0
,
client
);
#endif
}
}
static
int
static
int
...
@@ -454,6 +474,7 @@ ProcRenderSetPictureClipRectangles (ClientPtr client)
...
@@ -454,6 +474,7 @@ ProcRenderSetPictureClipRectangles (ClientPtr client)
if
(
!
pPicture
->
pDrawable
)
if
(
!
pPicture
->
pDrawable
)
return
BadDrawable
;
return
BadDrawable
;
#ifdef NXAGENT_SERVER
/*
/*
* The original code used sizeof(xRenderChangePictureReq).
* The original code used sizeof(xRenderChangePictureReq).
* This was harmless, as both structures have the same size.
* This was harmless, as both structures have the same size.
...
@@ -461,18 +482,23 @@ ProcRenderSetPictureClipRectangles (ClientPtr client)
...
@@ -461,18 +482,23 @@ ProcRenderSetPictureClipRectangles (ClientPtr client)
* nr = (client->req_len << 2) - sizeof(xRenderChangePictureReq);
* nr = (client->req_len << 2) - sizeof(xRenderChangePictureReq);
*/
*/
nr
=
(
client
->
req_len
<<
2
)
-
sizeof
(
xRenderSetPictureClipRectanglesReq
);
nr
=
(
client
->
req_len
<<
2
)
-
sizeof
(
xRenderSetPictureClipRectanglesReq
);
#else
nr
=
(
client
->
req_len
<<
2
)
-
sizeof
(
xRenderChangePictureReq
);
#endif
if
(
nr
&
4
)
if
(
nr
&
4
)
return
BadLength
;
return
BadLength
;
nr
>>=
3
;
nr
>>=
3
;
result
=
SetPictureClipRects
(
pPicture
,
result
=
SetPictureClipRects
(
pPicture
,
stuff
->
xOrigin
,
stuff
->
yOrigin
,
stuff
->
xOrigin
,
stuff
->
yOrigin
,
nr
,
(
xRectangle
*
)
&
stuff
[
1
]);
nr
,
(
xRectangle
*
)
&
stuff
[
1
]);
#ifdef NXAGENT_SERVER
nxagentChangePictureClip
(
pPicture
,
nxagentChangePictureClip
(
pPicture
,
CT_NONE
,
CT_NONE
,
nr
,
nr
,
(
xRectangle
*
)
&
stuff
[
1
],
(
xRectangle
*
)
&
stuff
[
1
],
(
int
)
stuff
->
xOrigin
,
(
int
)
stuff
->
xOrigin
,
(
int
)
stuff
->
yOrigin
);
(
int
)
stuff
->
yOrigin
);
#endif
if
(
client
->
noClientException
!=
Success
)
if
(
client
->
noClientException
!=
Success
)
return
(
client
->
noClientException
);
return
(
client
->
noClientException
);
...
@@ -713,6 +739,7 @@ ProcRenderTrapezoids (ClientPtr client)
...
@@ -713,6 +739,7 @@ ProcRenderTrapezoids (ClientPtr client)
return
BadLength
;
return
BadLength
;
ntraps
/=
sizeof
(
xTrapezoid
);
ntraps
/=
sizeof
(
xTrapezoid
);
if
(
ntraps
)
if
(
ntraps
)
#ifdef NXAGENT_SERVER
{
{
if
(
pFormat
!=
NULL
)
if
(
pFormat
!=
NULL
)
{
{
...
@@ -742,6 +769,11 @@ ProcRenderTrapezoids (ClientPtr client)
...
@@ -742,6 +769,11 @@ ProcRenderTrapezoids (ClientPtr client)
nxagentTrapezoidExtents
=
NullBox
;
nxagentTrapezoidExtents
=
NullBox
;
}
}
}
}
#else
CompositeTrapezoids
(
stuff
->
op
,
pSrc
,
pDst
,
pFormat
,
stuff
->
xSrc
,
stuff
->
ySrc
,
ntraps
,
(
xTrapezoid
*
)
&
stuff
[
1
]);
#endif
return
client
->
noClientException
;
return
client
->
noClientException
;
}
}
...
@@ -793,7 +825,9 @@ ProcRenderCreateGlyphSet (ClientPtr client)
...
@@ -793,7 +825,9 @@ ProcRenderCreateGlyphSet (ClientPtr client)
if
(
!
AddResource
(
stuff
->
gsid
,
GlyphSetType
,
(
void
*
)
glyphSet
))
if
(
!
AddResource
(
stuff
->
gsid
,
GlyphSetType
,
(
void
*
)
glyphSet
))
return
BadAlloc
;
return
BadAlloc
;
#ifdef NXAGENT_SERVER
nxagentCreateGlyphSet
(
glyphSet
);
nxagentCreateGlyphSet
(
glyphSet
);
#endif
return
Success
;
return
Success
;
}
}
...
@@ -819,7 +853,9 @@ ProcRenderReferenceGlyphSet (ClientPtr client)
...
@@ -819,7 +853,9 @@ ProcRenderReferenceGlyphSet (ClientPtr client)
}
}
glyphSet
->
refcnt
++
;
glyphSet
->
refcnt
++
;
#ifdef NXAGENT_SERVER
nxagentReferenceGlyphSet
(
glyphSet
);
nxagentReferenceGlyphSet
(
glyphSet
);
#endif
if
(
!
AddResource
(
stuff
->
gsid
,
GlyphSetType
,
(
void
*
)
glyphSet
))
if
(
!
AddResource
(
stuff
->
gsid
,
GlyphSetType
,
(
void
*
)
glyphSet
))
return
BadAlloc
;
return
BadAlloc
;
...
@@ -843,7 +879,9 @@ ProcRenderFreeGlyphSet (ClientPtr client)
...
@@ -843,7 +879,9 @@ ProcRenderFreeGlyphSet (ClientPtr client)
return
RenderErrBase
+
BadGlyphSet
;
return
RenderErrBase
+
BadGlyphSet
;
}
}
#ifdef NXAGENT_SERVER
nxagentFreeGlyphSet
(
glyphSet
);
nxagentFreeGlyphSet
(
glyphSet
);
#endif
FreeResource
(
stuff
->
glyphset
,
RT_NONE
);
FreeResource
(
stuff
->
glyphset
,
RT_NONE
);
return
client
->
noClientException
;
return
client
->
noClientException
;
...
@@ -871,7 +909,9 @@ ProcRenderFreeGlyphs (ClientPtr client)
...
@@ -871,7 +909,9 @@ ProcRenderFreeGlyphs (ClientPtr client)
nglyph
=
((
client
->
req_len
<<
2
)
-
sizeof
(
xRenderFreeGlyphsReq
))
>>
2
;
nglyph
=
((
client
->
req_len
<<
2
)
-
sizeof
(
xRenderFreeGlyphsReq
))
>>
2
;
gids
=
(
CARD32
*
)
(
stuff
+
1
);
gids
=
(
CARD32
*
)
(
stuff
+
1
);
#ifdef NXAGENT_SERVER
nxagentFreeGlyphs
(
glyphSet
,
gids
,
nglyph
);
nxagentFreeGlyphs
(
glyphSet
,
gids
,
nglyph
);
#endif
while
(
nglyph
--
>
0
)
while
(
nglyph
--
>
0
)
{
{
...
@@ -913,7 +953,9 @@ ProcRenderCompositeGlyphs (ClientPtr client)
...
@@ -913,7 +953,9 @@ ProcRenderCompositeGlyphs (ClientPtr client)
int
size
;
int
size
;
int
n
;
int
n
;
#ifdef NXAGENT_SERVER
XGlyphElt8
*
elements
,
*
elementsBase
;
XGlyphElt8
*
elements
,
*
elementsBase
;
#endif
REQUEST
(
xRenderCompositeGlyphsReq
);
REQUEST
(
xRenderCompositeGlyphsReq
);
...
@@ -1007,6 +1049,7 @@ ProcRenderCompositeGlyphs (ClientPtr client)
...
@@ -1007,6 +1049,7 @@ ProcRenderCompositeGlyphs (ClientPtr client)
}
}
}
}
#ifdef NXAGENT_SERVER
elementsBase
=
malloc
(
nlist
*
sizeof
(
XGlyphElt8
));
elementsBase
=
malloc
(
nlist
*
sizeof
(
XGlyphElt8
));
if
(
!
elementsBase
)
if
(
!
elementsBase
)
{
{
...
@@ -1016,11 +1059,12 @@ ProcRenderCompositeGlyphs (ClientPtr client)
...
@@ -1016,11 +1059,12 @@ ProcRenderCompositeGlyphs (ClientPtr client)
free
(
listsBase
);
free
(
listsBase
);
return
BadAlloc
;
return
BadAlloc
;
}
}
elements
=
elementsBase
;
#endif
buffer
=
(
CARD8
*
)
(
stuff
+
1
);
buffer
=
(
CARD8
*
)
(
stuff
+
1
);
glyphs
=
glyphsBase
;
glyphs
=
glyphsBase
;
lists
=
listsBase
;
lists
=
listsBase
;
elements
=
elementsBase
;
while
(
buffer
+
sizeof
(
xGlyphElt
)
<
end
)
while
(
buffer
+
sizeof
(
xGlyphElt
)
<
end
)
{
{
elt
=
(
xGlyphElt
*
)
buffer
;
elt
=
(
xGlyphElt
*
)
buffer
;
...
@@ -1028,10 +1072,12 @@ ProcRenderCompositeGlyphs (ClientPtr client)
...
@@ -1028,10 +1072,12 @@ ProcRenderCompositeGlyphs (ClientPtr client)
if
(
elt
->
len
==
0xff
)
if
(
elt
->
len
==
0xff
)
{
{
#ifdef NXAGENT_SERVER
#ifdef DEBUG
#ifdef DEBUG
fprintf
(
stderr
,
"ProcRenderCompositeGlyphs: Glyphset change with base size [%d].
\n
"
,
fprintf
(
stderr
,
"ProcRenderCompositeGlyphs: Glyphset change with base size [%d].
\n
"
,
size
);
size
);
#endif
#endif
#endif
if
(
buffer
+
sizeof
(
GlyphSet
)
<
end
)
if
(
buffer
+
sizeof
(
GlyphSet
)
<
end
)
{
{
...
@@ -1062,6 +1108,7 @@ ProcRenderCompositeGlyphs (ClientPtr client)
...
@@ -1062,6 +1108,7 @@ ProcRenderCompositeGlyphs (ClientPtr client)
lists
->
format
=
glyphSet
->
format
;
lists
->
format
=
glyphSet
->
format
;
lists
->
len
=
0
;
lists
->
len
=
0
;
#ifdef NXAGENT_SERVER
if
(
glyphSet
->
remoteID
==
0
)
if
(
glyphSet
->
remoteID
==
0
)
{
{
#ifdef TEST
#ifdef TEST
...
@@ -1077,6 +1124,7 @@ ProcRenderCompositeGlyphs (ClientPtr client)
...
@@ -1077,6 +1124,7 @@ ProcRenderCompositeGlyphs (ClientPtr client)
elements
->
nchars
=
elt
->
len
;
elements
->
nchars
=
elt
->
len
;
elements
->
xOff
=
elt
->
deltax
;
elements
->
xOff
=
elt
->
deltax
;
elements
->
yOff
=
elt
->
deltay
;
elements
->
yOff
=
elt
->
deltay
;
#endif
n
=
elt
->
len
;
n
=
elt
->
len
;
while
(
n
--
)
while
(
n
--
)
{
{
...
@@ -1103,7 +1151,9 @@ ProcRenderCompositeGlyphs (ClientPtr client)
...
@@ -1103,7 +1151,9 @@ ProcRenderCompositeGlyphs (ClientPtr client)
if
(
space
&
3
)
if
(
space
&
3
)
buffer
+=
4
-
(
space
&
3
);
buffer
+=
4
-
(
space
&
3
);
lists
++
;
lists
++
;
#ifdef NXAGENT_SERVER
elements
++
;
elements
++
;
#endif
}
}
}
}
if
(
buffer
>
end
)
if
(
buffer
>
end
)
...
@@ -1118,6 +1168,7 @@ ProcRenderCompositeGlyphs (ClientPtr client)
...
@@ -1118,6 +1168,7 @@ ProcRenderCompositeGlyphs (ClientPtr client)
return
BadLength
;
return
BadLength
;
}
}
#ifdef NXAGENT_SERVER
/*
/*
* We need to know the glyphs extents to synchronize
* We need to know the glyphs extents to synchronize
* the drawables involved in the composite text ope-
* the drawables involved in the composite text ope-
...
@@ -1160,17 +1211,28 @@ ProcRenderCompositeGlyphs (ClientPtr client)
...
@@ -1160,17 +1211,28 @@ ProcRenderCompositeGlyphs (ClientPtr client)
listsBase
,
listsBase
,
glyphsBase
);
glyphsBase
);
}
}
free
(
nxagentGlyphsExtents
);
free
(
nxagentGlyphsExtents
);
nxagentGlyphsExtents
=
NullBox
;
nxagentGlyphsExtents
=
NullBox
;
free
(
elementsBase
);
#else
CompositeGlyphs
(
stuff
->
op
,
pSrc
,
pDst
,
pFormat
,
stuff
->
xSrc
,
stuff
->
ySrc
,
nlist
,
listsBase
,
glyphsBase
);
#endif
if
(
glyphsBase
!=
glyphsLocal
)
if
(
glyphsBase
!=
glyphsLocal
)
free
(
glyphsBase
);
free
(
glyphsBase
);
if
(
listsBase
!=
listsLocal
)
if
(
listsBase
!=
listsLocal
)
free
(
listsBase
);
free
(
listsBase
);
free
(
elementsBase
);
return
client
->
noClientException
;
return
client
->
noClientException
;
}
}
...
@@ -1203,12 +1265,14 @@ ProcRenderFillRectangles (ClientPtr client)
...
@@ -1203,12 +1265,14 @@ ProcRenderFillRectangles (ClientPtr client)
things
,
things
,
(
xRectangle
*
)
&
stuff
[
1
]);
(
xRectangle
*
)
&
stuff
[
1
]);
#ifdef NXAGENT_SERVER
ValidatePicture
(
pDst
);
ValidatePicture
(
pDst
);
nxagentCompositeRects
(
stuff
->
op
,
nxagentCompositeRects
(
stuff
->
op
,
pDst
,
pDst
,
&
stuff
->
color
,
&
stuff
->
color
,
things
,
things
,
(
xRectangle
*
)
&
stuff
[
1
]);
(
xRectangle
*
)
&
stuff
[
1
]);
#endif
return
client
->
noClientException
;
return
client
->
noClientException
;
}
}
...
@@ -1231,8 +1295,6 @@ ProcRenderCreateCursor (ClientPtr client)
...
@@ -1231,8 +1295,6 @@ ProcRenderCreateCursor (ClientPtr client)
CARD32
twocolor
[
3
];
CARD32
twocolor
[
3
];
int
ncolor
;
int
ncolor
;
RealizeCursorProcPtr
saveRealizeCursor
;
REQUEST_SIZE_MATCH
(
xRenderCreateCursorReq
);
REQUEST_SIZE_MATCH
(
xRenderCreateCursorReq
);
LEGAL_NEW_RESOURCE
(
stuff
->
cid
,
client
);
LEGAL_NEW_RESOURCE
(
stuff
->
cid
,
client
);
...
@@ -1402,6 +1464,7 @@ ProcRenderCreateCursor (ClientPtr client)
...
@@ -1402,6 +1464,7 @@ ProcRenderCreateCursor (ClientPtr client)
cm
.
xhot
=
stuff
->
x
;
cm
.
xhot
=
stuff
->
x
;
cm
.
yhot
=
stuff
->
y
;
cm
.
yhot
=
stuff
->
y
;
#ifdef NXAGENT_SERVER
/*
/*
* This cursor uses RENDER, so we make sure
* This cursor uses RENDER, so we make sure
* that it is allocated in a way that allows
* that it is allocated in a way that allows
...
@@ -1411,10 +1474,10 @@ ProcRenderCreateCursor (ClientPtr client)
...
@@ -1411,10 +1474,10 @@ ProcRenderCreateCursor (ClientPtr client)
* client.
* client.
*/
*/
saveRealizeCursor
=
pScreen
->
RealizeCursor
;
RealizeCursorProcPtr
saveRealizeCursor
=
pScreen
->
RealizeCursor
;
pScreen
->
RealizeCursor
=
nxagentCursorSaveRenderInfo
;
pScreen
->
RealizeCursor
=
nxagentCursorSaveRenderInfo
;
#endif
pCursor
=
AllocCursorARGB
(
srcbits
,
mskbits
,
argbbits
,
&
cm
,
pCursor
=
AllocCursorARGB
(
srcbits
,
mskbits
,
argbbits
,
&
cm
,
GetColor
(
twocolor
[
0
],
16
),
GetColor
(
twocolor
[
0
],
16
),
GetColor
(
twocolor
[
0
],
8
),
GetColor
(
twocolor
[
0
],
8
),
...
@@ -1423,6 +1486,7 @@ ProcRenderCreateCursor (ClientPtr client)
...
@@ -1423,6 +1486,7 @@ ProcRenderCreateCursor (ClientPtr client)
GetColor
(
twocolor
[
1
],
8
),
GetColor
(
twocolor
[
1
],
8
),
GetColor
(
twocolor
[
1
],
0
));
GetColor
(
twocolor
[
1
],
0
));
#ifdef NXAGENT_SERVER
pScreen
->
RealizeCursor
=
saveRealizeCursor
;
pScreen
->
RealizeCursor
=
saveRealizeCursor
;
/*
/*
...
@@ -1441,8 +1505,8 @@ ProcRenderCreateCursor (ClientPtr client)
...
@@ -1441,8 +1505,8 @@ ProcRenderCreateCursor (ClientPtr client)
nxagentCursorPostSaveRenderInfo
(
pCursor
,
pScreen
,
pSrc
,
stuff
->
x
,
stuff
->
y
);
nxagentCursorPostSaveRenderInfo
(
pCursor
,
pScreen
,
pSrc
,
stuff
->
x
,
stuff
->
y
);
nxagentRenderRealizeCursor
(
pScreen
,
pCursor
);
nxagentRenderRealizeCursor
(
pScreen
,
pCursor
);
#endif
if
(
AddResource
(
stuff
->
cid
,
RT_CURSOR
,
(
void
*
)
pCursor
))
if
(
pCursor
&&
AddResource
(
stuff
->
cid
,
RT_CURSOR
,
(
void
*
)
pCursor
))
return
(
client
->
noClientException
);
return
(
client
->
noClientException
);
return
BadAlloc
;
return
BadAlloc
;
}
}
...
@@ -1459,7 +1523,9 @@ ProcRenderSetPictureTransform (ClientPtr client)
...
@@ -1459,7 +1523,9 @@ ProcRenderSetPictureTransform (ClientPtr client)
RenderErrBase
+
BadPicture
);
RenderErrBase
+
BadPicture
);
result
=
SetPictureTransform
(
pPicture
,
(
PictTransform
*
)
&
stuff
->
transform
);
result
=
SetPictureTransform
(
pPicture
,
(
PictTransform
*
)
&
stuff
->
transform
);
#ifdef NXAGENT_SERVER
nxagentSetPictureTransform
(
pPicture
,
&
stuff
->
transform
);
nxagentSetPictureTransform
(
pPicture
,
&
stuff
->
transform
);
#endif
if
(
client
->
noClientException
!=
Success
)
if
(
client
->
noClientException
!=
Success
)
return
(
client
->
noClientException
);
return
(
client
->
noClientException
);
...
@@ -1485,7 +1551,9 @@ ProcRenderSetPictureFilter (ClientPtr client)
...
@@ -1485,7 +1551,9 @@ ProcRenderSetPictureFilter (ClientPtr client)
nparams
=
((
xFixed
*
)
stuff
+
client
->
req_len
)
-
params
;
nparams
=
((
xFixed
*
)
stuff
+
client
->
req_len
)
-
params
;
result
=
SetPictureFilter
(
pPicture
,
name
,
stuff
->
nbytes
,
params
,
nparams
);
result
=
SetPictureFilter
(
pPicture
,
name
,
stuff
->
nbytes
,
params
,
nparams
);
#ifdef NXAGENT_SERVER
nxagentSetPictureFilter
(
pPicture
,
name
,
stuff
->
nbytes
,
params
,
nparams
);
nxagentSetPictureFilter
(
pPicture
,
name
,
stuff
->
nbytes
,
params
,
nparams
);
#endif
return
result
;
return
result
;
}
}
...
@@ -1530,12 +1598,14 @@ ProcRenderCreateAnimCursor (ClientPtr client)
...
@@ -1530,12 +1598,14 @@ ProcRenderCreateAnimCursor (ClientPtr client)
if
(
ret
!=
Success
)
if
(
ret
!=
Success
)
return
ret
;
return
ret
;
#ifdef NXAGENT_SERVER
nxagentAnimCursorBits
=
pCursor
->
bits
;
nxagentAnimCursorBits
=
pCursor
->
bits
;
for
(
i
=
0
;
i
<
MAXSCREENS
;
i
++
)
for
(
i
=
0
;
i
<
MAXSCREENS
;
i
++
)
{
{
pCursor
->
devPriv
[
i
]
=
NULL
;
pCursor
->
devPriv
[
i
]
=
NULL
;
}
}
#endif
if
(
AddResource
(
stuff
->
cid
,
RT_CURSOR
,
(
void
*
)
pCursor
))
if
(
AddResource
(
stuff
->
cid
,
RT_CURSOR
,
(
void
*
)
pCursor
))
return
client
->
noClientException
;
return
client
->
noClientException
;
...
@@ -1555,11 +1625,11 @@ static int ProcRenderCreateSolidFill(ClientPtr client)
...
@@ -1555,11 +1625,11 @@ static int ProcRenderCreateSolidFill(ClientPtr client)
pPicture
=
CreateSolidPicture
(
stuff
->
pid
,
&
stuff
->
color
,
&
error
);
pPicture
=
CreateSolidPicture
(
stuff
->
pid
,
&
stuff
->
color
,
&
error
);
if
(
!
pPicture
)
if
(
!
pPicture
)
return
error
;
return
error
;
/* AGENT SERVER */
#ifdef NXAGENT_SERVER
nxagentRenderCreateSolidFill
(
pPicture
,
&
stuff
->
color
);
nxagentRenderCreateSolidFill
(
pPicture
,
&
stuff
->
color
);
#endif
/* AGENT SERVER */
if
(
!
AddResource
(
stuff
->
pid
,
PictureType
,
(
void
*
)
pPicture
))
if
(
!
AddResource
(
stuff
->
pid
,
PictureType
,
(
void
*
)
pPicture
))
return
BadAlloc
;
return
BadAlloc
;
return
Success
;
return
Success
;
...
@@ -1591,12 +1661,12 @@ static int ProcRenderCreateLinearGradient (ClientPtr client)
...
@@ -1591,12 +1661,12 @@ static int ProcRenderCreateLinearGradient (ClientPtr client)
stuff
->
nStops
,
stops
,
colors
,
&
error
);
stuff
->
nStops
,
stops
,
colors
,
&
error
);
if
(
!
pPicture
)
if
(
!
pPicture
)
return
error
;
return
error
;
/* AGENT SERVER */
#ifdef NXAGENT_SERVER
nxagentRenderCreateLinearGradient
(
pPicture
,
&
stuff
->
p1
,
&
stuff
->
p2
,
nxagentRenderCreateLinearGradient
(
pPicture
,
&
stuff
->
p1
,
&
stuff
->
p2
,
stuff
->
nStops
,
stops
,
colors
);
stuff
->
nStops
,
stops
,
colors
);
#endif
/* AGENT SERVER */
if
(
!
AddResource
(
stuff
->
pid
,
PictureType
,
(
void
*
)
pPicture
))
if
(
!
AddResource
(
stuff
->
pid
,
PictureType
,
(
void
*
)
pPicture
))
return
BadAlloc
;
return
BadAlloc
;
return
Success
;
return
Success
;
...
@@ -1627,14 +1697,15 @@ static int ProcRenderCreateRadialGradient (ClientPtr client)
...
@@ -1627,14 +1697,15 @@ static int ProcRenderCreateRadialGradient (ClientPtr client)
stuff
->
nStops
,
stops
,
colors
,
&
error
);
stuff
->
nStops
,
stops
,
colors
,
&
error
);
if
(
!
pPicture
)
if
(
!
pPicture
)
return
error
;
return
error
;
/* AGENT SERVER */
#ifdef NXAGENT_SERVER
nxagentRenderCreateRadialGradient
(
pPicture
,
&
stuff
->
inner
,
&
stuff
->
outer
,
nxagentRenderCreateRadialGradient
(
pPicture
,
&
stuff
->
inner
,
&
stuff
->
outer
,
stuff
->
inner_radius
,
stuff
->
inner_radius
,
stuff
->
outer_radius
,
stuff
->
outer_radius
,
stuff
->
nStops
,
stops
,
colors
);
stuff
->
nStops
,
stops
,
colors
);
/* AGENT SERVER */
#endif
if
(
!
AddResource
(
stuff
->
pid
,
PictureType
,
(
void
*
)
pPicture
))
if
(
!
AddResource
(
stuff
->
pid
,
PictureType
,
(
void
*
)
pPicture
))
return
BadAlloc
;
return
BadAlloc
;
return
Success
;
return
Success
;
...
@@ -1664,13 +1735,13 @@ static int ProcRenderCreateConicalGradient (ClientPtr client)
...
@@ -1664,13 +1735,13 @@ static int ProcRenderCreateConicalGradient (ClientPtr client)
stuff
->
nStops
,
stops
,
colors
,
&
error
);
stuff
->
nStops
,
stops
,
colors
,
&
error
);
if
(
!
pPicture
)
if
(
!
pPicture
)
return
error
;
return
error
;
/* AGENT SERVER */
#ifdef NXAGENT_SERVER
nxagentRenderCreateConicalGradient
(
pPicture
,
&
stuff
->
center
,
nxagentRenderCreateConicalGradient
(
pPicture
,
&
stuff
->
center
,
stuff
->
angle
,
stuff
->
nStops
,
stops
,
stuff
->
angle
,
stuff
->
nStops
,
stops
,
colors
);
colors
);
#endif
/* AGENT SERVER */
if
(
!
AddResource
(
stuff
->
pid
,
PictureType
,
(
void
*
)
pPicture
))
if
(
!
AddResource
(
stuff
->
pid
,
PictureType
,
(
void
*
)
pPicture
))
return
BadAlloc
;
return
BadAlloc
;
return
Success
;
return
Success
;
...
...
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